So the reverse:
If the defender has transports they cant be allocated as hits in any combat round. They are invisible and automatically removed from play provided the non-transports have been removed as combat loses. If the attacker does not stay long enough to kill the last combat ship the defending transports remain in place.