Ok, I tried everything I could, but I still don't understand this.
I think it's a bug.
I'm making my custom Save script which should first check some things and then save the project.
SAVE.lua is a test script which has just one line in it, the save command.
Steps to reproduce the problem:
1. Load a project
2. Make a modification (move the item)
3. Run custom save script
(everything is still fine, the project saves properly)
4. Move edit cursor
5. Run custom save script AGAIN
(PROBLEM: The project changes to [modified] and is marked as dirty by * character.)
The same thing happens with both save command and api save function.