Auto-Save on Window Change - Visual Studio Marketplace
Extension for Visual Studio Code - Auto-Save files by switching between windows.