Hello
Thank you for your question and reaching out.
Check the power plan settings. Control Power->Power Options. Make sure the monitor time out and sleep time are set beyond a minute or never. Check the advanced settings, if your system is a laptop on battery, make sure the battery is charged. In low power state the system can either shutdown or sleep.
If the system is sleeping, you can disable the request for password in Group Policy. run gpedit.msc. Computer Configuration->System->Power Management->Sleep Settings: disable - Require a password when a computer wakes (on battery).
Reference :
---------------------------------------------------------------------------------------------------------------------------------------------------
--If the reply is helpful, please Upvote and Accept as answer--