The Rulebook Says:
6. Combat Resolution
The combat is concluded by performing the following steps:
1. Determine Victor
3. Retreats and Routing
4. Combat Clean Up
The FAQ says:
Q: At what point does the winner of a combat
exert control over the embattled area?
A: Control over an area does not change hands
until all stages of combat are completed.
In your example Tyrell does not take control of Lannisport (and the Ships are not destroyed) until AFTER Lannister has retreated his land units.
I think it should be noted that many PBF games have house ruled against this. So most games on BGG PBF-style would let Lannister retreat to Stoney Sept. But as far as what the rules actually says Andy is spot on.