Open the Settings App.
Go to Accounts - Sign In Options.
Disable the 'If you've been away, when should Windows require you to sign in again' setting, if it exists.
Disable the 'Dynamic Lock' setting.
Restart (not shut down) your PC to apply the change and check if that resolves the problem.