If Construct let you place layers on top of HTML elements, would that solve a lot of the problems then? I had a feature like that planned.
I think people mean lots of different things when they say "UI" - sometimes it means things like text inputs, which browsers already do very well, and are often very tricky with in-house engines. Playing Valheim recently I noticed the text inputs are kind of janky with poor support for selections, keyboard shortcuts, and other missing features - I think that's some in-engine Unity plugin. The browser built-in stuff is actually very sophisticated, something I went in to detail on in this blog. In other words, doing this in-engine is extremely difficult and a colossal amount of work, and even then it doesn't always reach the standard of a basic part of a browser engine!
I don't think it's even feasible for us to address this as we just don't have a large enough team, which is why I'm focused on making HTML and CSS work - and if we can get it integrating nicely it will probably end up a much more powerful and flexible system than if we did it ourselves. Still, third-party developers could give an in-engine UI system a go if they really wanted to - best of luck to them if they try!