On specific non-content pages (/user/, preface page without path, ...) link generated into menu is wrong. I do not see how get the target. It depends on language. I thought it is last visited page but it is not true.
Note: I have installed Domain_access but I saw it before installation as well.
Drupal 9
Go to page "/" "en/" or "/user" and check links in switcher menu. As bonus pop up menus does not work as well (when I am in non default language). So I considered if bug is in language switcher. But the link generated into items are obviously wrong.
Not sure
Active
1.0
Code