The bug that you noted is Godot 4 fault as you can see on their documentation https://docs.godotengine.org/en/stable/tutorials/export/exporting_for_web.html but there a fix:
For those who want to run the html version on macOS, make sure you go to "chrome://flags" and select "Metal" as a "Choose ANGLE graphics backend" option, then restart the browser, the game should run just fine. This fix is only for chromium based browsers, i use it on Brave and it works fine, not sure if Safari or Firefox have flags