I first noticed the problem using PCC when I tried to start a basic program, looking at the PCC source code I noticed that is uses save context therefor I used the files command because it shows the files. According to the documentation there is no restriction using it from within a program. I pulled out the original Pico1 (delivered with the PicoCalc) and ran the same test successful under V6.00.02RC23.
In the meanwhile I have done some more digging and found that the problem is most likely to do with Commands.c:SaveContext and Commands.c:RestoreContext. I removed all write and read statements from the routines and noticed something very strange. Running the same test many times will list the .vars and the bootcount files, after a few repetitions the bootcount file disappears.
Update: PicoMite RP2040 using the same source shows no problems.
Update:
V6.01.00b10 adcockm RP2040 no problems
V6.01.00b10 adcockm RP2350 no problems
V6.01.00b10 pelrun RP2040 no problems
V6.01.00b10 pelrun RP2350 fails