I followed this tutorial to capture the mouse on my game: https://kidscancode.org/godot_recipes/4.x/input/mouse_capture/index.html.
Not sure how compatible it is with the web export though, you might have to tweak some settings on Itch.io side. Probably the best is to choose the setting that put your game in fullscreen when the user press “Play” on the game page.
Good luck!


