If the attacker destroys or disables all your landing spaces on carriers, then withdraws, you can move the planes one space to find a landing spot. If you cannot find a valid landing space, they all die.
Don’t forget also that kamikaze can be used (where otherwise permitted) to disable one or more carriers, which then causes all the carried planes to crash (if no other spot is available).
For this reason, it is advisable to bring EXTRA carriers with free spaces in during a SZ 6 invasion, so your fighters are not as vulnerable to this Axis trick.
Don’t forget that because of “order of casualty” considerations, a battle that was otherwise in your favor (more hits, more attack/defense power) could turn against you because certain units (subs, fighters without DD) can only hit sea/vs/air can simply disable your carriers first and crash all your planes–-he doesn’t have to defeat you in detail during combat. (This is another reason why the DD is such a powerful unit and needs to be with every fleet)