Hi Alexey,
Sorry, I didn't realize you responded.
Just in case I wasn't clear in my initial post, I wrote a script to handle my processing from the CLI. If I then open the project file in the GUI, I get the read-only mode message box. It seems that using Metashape.app.quit() at the end of my script does not properly close the project.
Closing the project through the GUI, by clicking on the 'X', does not produce this issue.
I am currently running version 2.1.1.17821 on Windows 11 23H2.