I can't say I've tried a WebGL game with controller before but it doesn't do this with steam games. usually connecting the controller hides the mouse. I'm just using an xbox controller with a usb3 cable.
However, while writing this I figured I'd try a ps5 controller and it works totally fine!!! so it must be the controller.