I have created one site collection using modern team site, which contains various sub-sites. I have set hyperlinks of different sub-sites in left navigation of root site and subsites manually.
Now, when I visit one sub-site, it would show that hyperlink in left navigation as active one as per expected behavior, but for some of the sub-site links, it's not showing them active, instead it shows active link on some other site's links in left navigation.
i.e. In my case when select "Finance and HR" site it's showing "Sales" link from left navigation as active.