I have faced with such issue i am opening project that placed in my desktop (mac 14 pro m3 pro) I can see the folder where is my script:
After running and stoping the script (i am getting some error) The folder is disappear:
And it returns when switch window to safari or any app and return again or click Reload all from disk1

I have tried to delete or clear cache , nothing works