Publishing to webGL (or mobile) is often a bit stricter than to desktop (e.g. case sensitivity on filenames and other quirks around the filesystem).
Are you coding in C# or in gdscript? Not wanting to be a downer but it seems Godot still doesn't support webGL builds in C# :/
https://docs.godotengine.org/en/stable/tutorials/export/exporting_for_web.html