My guess is that in order to be protected, they have to come from the same sea zone.
They can be attacked, if they move into the sea zone unaccompanied. If the surface warships come from a different sea zone, it’s a separate move that results in the transports becoming accompanied after both of the moves. Since the move itself was unaccompanied, and it’s the move that grants the option for the subs to attack, the move made by the transports would have to include the surface warships, for the transports to be protected from the attack.
But, I could see it being FAQed the other way, as well.