is it because your cursor is leaving the window? that appears to be common after the latest update and when you click while its outside it will unfocus the game and the game will pause. its genuinely insane how they didnt find this if they actually playtested it
when in fullscreen mode it apparently moves way faster than normal to reach the other side and leave the window from the two sides, i went into a bedwars game to see if anyone else had the issue but nobody else did. i even died a couple times because i couldnt stop clicking off the game