Going to lock screen during gaming?

Has anyone come across this issue during gaming the computer will go straight to lock screen? Iḿ asking because this happens me for the last 2 days. So the process will go like this:

Iḿ playing WoW, 30 minutes in computer will go straight to lock screen. Then I unlock screen and continue playing. This go on and on for the entire time Im playing.

Anyone else has this happen?

Yes this is my current headache. I will be playing D4 and it will start to dim then lock. My only work around is to manually disable it in energy settings. I do not use mouse and keyboard I use an Xbox controller. So I wonder if its not registering as active use while using it?