Welcome, indignation!
Retreating is done at the end of a combat round. You can’t skip the prior steps and go straight to retreating, so you must fight at least one round of each declared battle. It’s the same in all versions.
However, in AA42, AA50, and AA40, attacking (and defending) subs may avoid fighting by submerging at the beginning of the first round if there are no opposing destroyers.