Automatic logout provides you or an administrator the ability to log out after a specified time of inactivity. See a similar list of articles on how this can be done in Windows. Also, see how to enable automatic login on Windows 10 via the Registry.
Follow the steps described below to disable automatic logging out of users. See this guide on how to enable or disable automatic login on macOS: Fix username greyed out for automatic login.
The option is found in the System Preferences window as shown below - Security & Privacy General
This will open up the Security and Privacy window as shown below.
– Click on the General Tab as shown below
– Click the on the lock icon 🔒to unlock it
– Enter an administrator name and password
– Click Advanced
Uncheck “Log out after minutes of inactivity as shown below and click Ok
Finally Click on the Lock again, to activate the lock as shown below