Couldn’t reproduce it again as well. I actually simulated the exact same thing, but i was able to get out during combat move phaze, even though I wasn’t attacking anything else.
So, must’ve been a one timer.
In that particular game though, I was able to “unstuck” the submarine eventually by attacking a misplaced transport 😛.