UIScope works not as expected

I need to preserve some data per browser window/tab. UIScope seems to perfectly match this goal. I’ve prepared the class annotated with @SpringComponent and @UIScope and injected it in the MainLayout. Opening starting page in two different tabs I see that the same instance of UIScope-ed component is used. What I am doing wrongly? I use the latest release of Vaadin 24.

That sounds weird and should not happen. Just as a side note I would recommend to use @RouteScope instead and use MainLayout as @RouteScopeOwner. This is usually better as when page is refreshed Vaadin creates a new UI instance and especially in connection @PreserveOnRefresh it will become as a suprise that new instance is injected. But your problem is new of its kind, usually the problem is the opposite direction as I described. Thus it would be preferable if you can reduce your case to minimal demo code, which be easily tested by Vaadin team and open bug ticket at: https://github.com/vaadin/flow/issues