VSCode always seems to remember my session and reopen the files and/or project that were open the last time I used it. It obviously behaves correctly when running it from th
If "window.restoreWindows": "none"
not solve the problem,
then try to run code as root -> sudo code --user-data-dir
code files and restart code normally without root.
For me, none of above is working while I'm trying to close "dirty" unsaved files which I accidentally edited 1000 files and wanted to ignore saving all of them.
My fix was adding this line into settings.json:
"files.hotExit": "off"
Open up vscode, close vscode and just click the confirmation button to close all of the files without saving.
Then open back vscode and boom.. no more unsaved files being shown.