Wouldn't this be prevented by just allowing retreat from all sides of map, instead of this weird chessboard approach? You know, like I suggested a few months ago... though to be clear, it was only for direct retreat (tactical would still exit normally), and exiting from sides would still damage retreating ship. Retreating from enemy side (ie, the top, since player always enters at bottom as far as I can tell unless pursuit battle) would do even more damage to retreating ship, basically penalizes player for not retreating normally.
Also, would be kinda nice for player and enemy to enter from sides occasionally instead of top/bottom...