Make Microsoft Teams Focus on the Proper Window
This has been an issue forever. Microsoft doesn’t care.
A potential workaround that sometimes solves the problem is the ability to replace the silly tiny badly-programmed Chrome window notifications that should never have existed with real macOS notifications.
Native notification functionality is in the developer preview of Teams and can be enabled from notification settings. It’s been in development for 5 years and only available in developer preview for 1.5 years, so don’t hold much hope for it coming to the normal build soon.
Also, I say only sometimes because there’s still lots of cases where the main Teams window doesn’t activate even when it’s the only window in the list of windows, such as if it’s in a full screen space on a secondary display. There’s no workaround for this — again Microsoft need to fix this.