Hi Lazlow and welcome to the forum!
If you have screensavers active, please check it's setting and remove the check mark on resume, display logon screen.
You'd also want to check your power settings and set every setting on sleep, hibernate and shutdowns to never.
If that is not the culprit, try and have a look at your setting in you Local Group Policy by clicking on Win+R, type gpedit.msc
Navigate to Computer Configuration>Windows Settings>Security Settings>Local Policies>Security Options and check the setting here.
Hope it helps