If you’re starting from scratch - consider using the routing dependency.
This’ll make the navigation links in the sidebar work as you describe
(swap the NavigationLink components for routing.router.NavLink components - which themselves are subclasses of the m3 NavigationLink)