It does sound like a computer security program is deleting the file.
No idea what you have in that regards but most also have an EXCLUSIONS or WHITELIST where you can add a path or filename.
That would be my starting point.
Also be very wary if you are using CLOUD based storage such as ONEDRIVE etc. as they can cause thier own issues with the IDE.