The lag is caused by the first instance of GPUParticles3D, which seems to only happen in a web build.
Related git issue: https://github.com/godotengine/godot/issues/87891
I have fixed the issue by instantiating them on a loading screen. The new build needs to be uploaded by Toxii, though.