Apple Mail randomly becomes the frontmost application in macOS
I've had this issue for the past 2–3 years. It seems to happen because of improper error handling. If you look closely at the app in the instant it opens, your affected account will have a “disconnected” symbol next to it in the sidebar. However, it goes away before an error can be shown.My theory is: there is a momentary connection issue with these G Suite accounts, and Mail.app starts to show an error by focusing itself, but the error is resolved so quickly it doesn't actually get to show the “connection problems” modal.I hope this can be fixed soon, it's been a daily annoyance for me for a long time now.