There’s a few different ways to capture the mouse with godot I learned after. That’s a new one!
Yeah, when exporting for web I recommend always capturing on click if it's not captured already captured.
Trying to capture in something like a _ready() function won't work because browser doesn't allow you to arbitrarily capture a mouse. What if you're for example at the bottom of the page, reading something when the capture is called, it can't allow that.