Mouse stuck in editor but focus on second window

When I try to launch 2 players in selected viewport, the mouse is stuck (locked inside) the editor but the focus is on the client window. This means any keypress and mouse movement are registered in the second client window but the mouse is stuck inside the editor’s game.

If I click twice on the editor then the focus is back on that. Not sure when this started happenig.