This is a known issue. They appear to be "fixing" this in the next patch where if this happens it will teleport all units outside the map to your main base. It's not really a fix, but it's better than just auto-losing the game.

Xavier0080
Recruit - Bronze