Hi,
May I ask what specific game it is?
Does this happen to all the games?
What platform are you using, like the MS Store app, Xbox app, or Steam?
If it is a Minecraft or any other game that requires signing in using your Microsoft account, please try to sign out or remove the account in the game and restart your PC. Try signing in again.
I look forward to your response.
Stay Safe!