Hi Razon YT,
Welcome to Microsoft Community. I'm Mosken, let me help you.
According to your description, I know that you were playing a full-screen game, the window was minimized since you opened the search bar with the Windows key.
Firstly, could you let me know the system version? Please check it (you can display it by pressing the Win key + R key, and entering "winver", then Enter), and only send the relevant information without PII in the next reply.
Did you try different games? I tried to reproduce the scenario you described and found that some games are not affected by the Windows key. Therefore, I inferred that it's related to the settings inside the game. I recommended that you adjust the window display settings in the game.
Otherwise, Change the state of Windows Game Mode:
Press the Start button, type Settings in the search box, and then select Settings.
Choose Gaming > Game Mode.
Turn Game Mode On or Off.
Tips, you can use Win + S or Win + Q to directly open it.
Hope it helps! If any updates, please feel free to tell me.
Best Regards,
Mosken_L - MSFT | Microsoft Community Support Specialist