VSCode enables the following options for files.autoSave:
Each having the following description:
What is the difference between the two? When does the editor lose focus and when does the window do that?
onFocusChange
auto-saves files both when you switch windows on your computer AND when you switch tabs within VSCode.
onWindowChange
auto-saves files only when you switch windows on your computer.