If there’s a misconfiguration with the power settings on your PC, it may result in data loss and your apps closing.
Open Windows Settings app.
Go to the System tab, then click on Troubleshoot in the right pane.
Click Other troubleshooters.
Find and select the Power option, then click the Run button to initiate the troubleshooter.
You may also disable Hybrid Sleep:
1, press “Windows”+“x”, choose “Windows PowerShell(Admin)”
2, in Windows PowerShell, input: powercfg –h off , then press enter
If required, you need run SFC and DISM.
Sometimes, newly installed updates and patches can change system settings, causing miscommunication between the PC and its components.