I experienced having a small alliance force in Cadiz that was cornered by the Bourbons. With two corps, they were too big to go into the fort, so I stood and fought. Since Gibraltar was occupied by the Bourbons that was not an option. However, we were wondering (in retrospective) if a withdraw by sea would be an option. Retreat by sea is per 16.4.3.B, and that's how part of my defeated force made it out.
Thanks. My pal and I are enjoying the game quite a bit by e-mail.
I assume you are using the Vassal module? Joel Toppen did a great job with it.
You played it correctly. A force cannot avoid battle by sea, but up to two corps can retreat by sea if the force loses. One thing to note, if you were pretty certain of losing, per 14.7.4 one corps could have avoided battle by retreating into the fortress, leaving the other corps to fend for itself (ensuring you would only take one hit in the battle).