Since the defender still has the fighters the combat will continue until all units (naval/air) of one side are destroyed (or even both sides) or the attacker withdraws.
There is a third option. The battle will also end if neither side has any units that can hit combat units on the other side. For example, if only the attacking sub and a defending fighter remain. If the defending transport also remains at that point, it will be automatically destroyed, as the sub would hit it eventually.
As long as the battle continues (in this case, it continues as long as there are air units on both sides and the attacker doesn't retreat), the sub must roll to hit the transport (or submerge). The transport won't be automatically destroyed until the battle is over (and then only if the attacker hasn't retreated).