I am sure, I locked the mouse in the middle, so it shouldnt be happening. Sorry for your experience.
Viewing post in Legend of Shadow Hunter jam comments
Well, Gecko-based browser reports locking and locks allright so at least some locking code is in there.
Most probably it is just how different browsers react to different pointer-grabbing attempts though I don't have any prohibitive settings of this sort enabled.
You probably might want to test with different browsers and try different methods and workarounds. The Chromium-based browser that fails to be locked for example is Falkon (it is not an obscure title in Linux world).
If it turns out to be the problem with the browser you can open an issue here at their repo https://github.com/KDE/falkon with your game as a testcase or even fix it yourself or make a warning on the game page that pointer-grabbing might fail with some browsers.
It is just I wouldn't disregard the possibility that Unity or Itch use not fully compliant methods to cut development time or whatever. In this case some settings/HTML shell/Javascript tweaking might be needed.
Unfortunately I haven't tried to make a mousegrab in my Godot to test things so i can't tell what exactly might be going on under the hood.