Your Godot version:
Godot 4.2
Issue description:
The recommended version in the document is Emscripten 1.39.9+,which will cause compilation errors. Too newer version will cause a LTO error, but an older version (Within the recommended version range) will cause a GL_WORKAROUND_SAFARI_GETCONTEXT_BUG not found error.

URL to the documentation page:
https://docs.godotengine.org/en/latest/contributing/development/compiling/compiling_for_web.html
After my testing, Emscripten version 3.1.26 can perform compilation tasks correctly.
Production edit: corrected LTO typo