HTML5 cursor outside game window after being shown when changing to new UI panel

This issue seems to only be occurring with HTML5 (I am in version 4.22.3) To initially use a game window you have to click, but every time the cursor is shown after that you have to click the game window again to hide it, how can I fix this? I have included my code for this interaction below as well as a video of both it functioning as expected when launched on PC and it’s odd behavior in HTML5. Let me know if I can provide any additional information and thanks in advance for the help :slight_smile:

Process Working on PC

Process failing on HTML5