Sometimes auto-logout will irritate the user because after few minutes of inactivity in your computer it will automatically log out your current account. And if you want to use it, it will force you to log in again with the credential (if set) every time.
Actually, these are good features. Suppose you are using your computer and certain you have to go out and you have forgotten to shut down or log out from your PC then any authorized person can use your PCs and harm your system. So, I believe this is good to have.
You can disable the auto-logout feature in various ways.Some are mention here:
Method 1: Disable Auto Logout Using System Settings
Click on Search Icon on Task Bar
Select Settings from the list
Under System tab, expand Power & battery tab
Under Power, Expand "Screen and sleep" and then
- Change On battery power, turn off my screen after dropdown to never.
- Change When plugged in, turn off my screen after dropdown to never.
- Change On battery power, put my device to sleep after to never.
- Change When plugged in, put my device to sleep after to never.
Now, your Windows 11 PC will never go to sleep and never log out the screen under any condition even after your inactivity.