Visual Studio 2022 now has Autosave features that automatically save files when Visual Studio is in the background. We can continue using our favorite shortcut with Ctrl+S to save Visual Studio files. However, Autosave in Visual Studio can be enabled, which will save all the unsaved documents as soon as focus leaves the Visual Studio editor. This is feature is already available in Visual Studio Code now we can have the same feature available in Visual Studio 2022
AutoSave in Visual Studio 2022
AutoSave in Visual Studio 2022 is a preview feature, and by default, it is turned off. Follow the below steps to enable it.
Navigate from Tools > Options > Environment > Preview Features and Enable the autosave.
Once you have Autosave Enabled, when Visual Studio loses focus, all the unsaved documents will be saved.