macOS closes all my applications when I lock my screen When I lock my screen with ControlCommandQ and return after more than 10 minutes, macOS has closed all my open apps and tries to restore them, which often leaves my applications in half restored states.

This did not happen before. Also a few times I have been logged out randomly, causing the same issue.

I'm using macOS High Sierra 10.13.6.

Security and Privacy settings:


Advanced, Log out after x minutes is not checked.


Any guesses for why this happens?
Open System Preferences from the Apple menu in the top-left corner. Open the &quot;Security &amp; Privacy&quot; preference pane. Click on the &quot;Advanced...&quot; button in the bottom-right corner. You may need to unlock the pane using the padlock icon in the bottom-left corner.
I think you'll find &quot;Log out after XX minutes of inactivity&quot; ticked. Untick it.

Reference: https://apple.stackexchange.com/a/140077