I work on a GUI toolkit professionally. Immediate-mode libraries are cool, but they absolutely in no way shape or form scale better. Having to evaluate and layout the entire UI for every state change is fundamentally not scalable. Doubly so if you need to do this multiple times to reach a steady-state layout like you do in some cases with egui.
you can cache layouts with immediate mode libraries. in terms of scaling, it really depends - if you have many components updating at once, the benefits of retained mode libraries are diminished if not reversed. when people create demos of 10,000 list elements and updating a single one, it's basically designed as a best case scenario for retained mode. try updating the entire list...
but i can make strong claims about the benefits of not needing to duplicate your state inside of your ui framework. that alone removes an entire category of work, and i would argue scales better from a conceptual/dev standpoint.