The game freezes when pressing Alt-Tab

Hello! I have a problem. When I minimize and maximize the game in the browser on PC using Alt-Tab, the mouse control freezes until I Alt again. Tell me how can I fix this problem? Maybe there is a simulation of pressing the keyboard? So that when the screen is focused, Alt is pressed automatically.

Does anyone have any ideas how to fix this error?