Infinite loop of yielding focus, alt-tab is broken

When I start up SC2, sometimes at random it yields the focus (like alt-tabbing back to my desktop). On startup, the screen goes black for a second and then I’m back on the desktop. Then I click on SC2 in the taskbar and the screen goes black for a second and I’m back on the desktop. So then I force quit SC2 and start over. The same thing happens again. After 5 cycles of force-quitting and restarting, maybe I get lucky and get SC2 to actually start up properly.

Sometimes the same thing happens if I am in-game and I alt-tab out and then I can’t get back in. Other times the game won’t let me alt-tab out of it.

No idea why this is happening of if there’s anything I can do to reduce the likelihood of it happening.

IMO windows shouldn’t even let programs take/yield focus, to prevent these sorts of bugs. It should just leave it up to the user to alt-tab or not. World of Warcraft and Hearthstone never have this problem, but SC2 and HOTS are really buggy around alt-tabbing. Seems like the sort of thing where the code could just solve it once and apply it to all the games.