Almost every single day I open up my laptop and open RPG Maker MV, my WIP game almost ALWAYS has something wrong with it. Whether it's the data corrupted, the .rpgproject file, the javascripts; this morning it was all three.
I don't close my laptop with RPG Maker open, because I noticed that could have been the source of the issue, but alas, it's still happening. Every single day I have to make a new project and copy over my maps, and often the data files are corrupted too so I have to go to a previous version.
Is there any way to stop this from happening?
Basically this means that something damages those files - and you need to find out where the damage comes from to stop this.
It could be a background program interfering with saving, it could be that your windows shutdown is interrupted before the saved data is completely transferred to the harddrive, it could be that your harddrive is about to completely fail (check its S.M.A.R.T.-status, if that is far lower than 80% then save your data and exchange the HDD) or several other options.
The RM's are more vulnerable to shutdown and file problems than other programs due to the way they handle data storage, but the editor doesn't damage the files - this is an indication that something else does this.
I would suggest, at least for now, and maybe as a permanent 'discipline', to close the Project before exiting the Editor, then, systematically, copy the entire 'Project' folder to another disk, preferably an external disk. Then, and only then, shut down the laptop, finishing off by closing the lid once it's shut down. This, in itself, may keep the issue from happening, but even if not, will allow you to recover the latest Project from the backup. Try it; see if it helps at all, maybe..?
My suggestion: NEVER shut down the laptop as soon as you exit the editor. Save processes can take a minute or two to run, and a shutdown can interfere with that (it shouldn't, but it can). Always exit the editor at least 5 minutes before you decide to close the laptop down, if possible.
Where are you saving your projects to? Are you using the Steam version of RM or the standalone?
That could be the problem - syncing with onedrive adds an extra layer of potential delays.
I suggest you move it to somewhere just on your PC (no automatic syncing with online storage like onedrive, dropbox, etc) and see how it goes over the next few days.
I think there was someone with the very same problem not that long ago and yes, it was because they were saving directly on OneDrive.