If your program's auto-save works like that, it's broken.
Almost none do, though. Auto-save almost always writes to a temporary file, that is erased when you save manually.
Google Docs and VS Code are the first two that come to mind for autosave and they don't use a temp file.
Google Docs and VS Code are the first two that come to mind for autosave and they don't use a temp file.