I find it ironic that Unity is used as an example... the immediate mode UI was/is considered a joke.
Terrible performance, doesn’t scale to UIs more complex than a form (... like the ones many games tend to have)
It got to the point where there was a website dedicated to track when we’d get the current non-immediate UI, and Unity actually hired the developer of the leading non-immediate mode UI library in the asset store to work on their own offering.
I think you're mis-understanding why Unity switched. They only switched their in game GUI system. The entire app of Unity itself uses an ImGUI system and it is massively more complex than any Game UI and runs just fine.
The reasons they switched the in game system are many but they have nothing to do with performance.
The old system would stack up draw calls like nobody's bussiness, doubling drawcalls if you used the built in layout tools. OnGUI being called period would be expensive, even when you had properly implemented your rendering logic, so you’d have to disable the entire game object when you didn’t want to draw.
The docs for mobile literally used to say not to use the OnGUI stuff during gameplay.
Terrible performance, doesn’t scale to UIs more complex than a form (... like the ones many games tend to have)
It got to the point where there was a website dedicated to track when we’d get the current non-immediate UI, and Unity actually hired the developer of the leading non-immediate mode UI library in the asset store to work on their own offering.