In LibreOffice Basic, this call returns "1":
The format string specifies "put the text as is", but the "001" obviously gets converted to a number before processing.
Note that Format documentation  is wrong where it tells "expression: Numeric expression". In fact, this function argument is Variant, and works with input like "Bar" as expected, without converting it to 0. (FTR: the method is specified at , implemented in , and functionally implemented in .)
In VBA, the call above produces the expected "001".
Version: 188.8.131.52.alpha0+ (x64) / LibreOffice Community
Build ID: 0aea0cee58fe77a9058217dfdfc3d6a02b29ee2a
CPU threads: 6; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: en-US (de_DE); UI: en-US