Yeah this really bugs me because it leads people down the path of WASM craziness when the language is rarely the problem.
Most web apps are slow because the DOM is slow.
Most web apps are slow because the DOM is slow.
Most web apps use it for what it wasn't meant to do, in an inefficient matter, with useless rerenders and overhead.
Why not create a UI system, like X Window over the web (I know X can be done over the network) specifically for web apps? Solve the issue at the root and leave the DOM to documents.