Have you ever seen the Windows login ... but I'm not sure about that—for me, it seems like it just restarts once, regardless of whether I tell it to update and shut down or update and restart.
For example, if a restart is pending for installing Windows Update, and it is already scheduled, your PC might not take permission to shut it down even when you play games. Alternatively ...