The attacker retreats before the defender submerges, in both OOB and LHTR.
This is clearly spelled out in the LHTR rules. However, since the sequence is never specifically stated in the OOB rules, the general principle that the attacker acts first must be applied.