@Von-Kuulness You are reading the rules correctly.
Your submarine would only have been able to retreat if it had established a valid alternative retreat route during combat movement (in case that had been possible, it depends on the map of course).