I don't think it's a glitch or a cheat... That happens also in the airfields (that's why spawnkillers can't destroy you while you are landed).
When you get a carrier under your command, it starts to work as the airfield: you are invincible (except if they drop a bomb over you

).
That's why many players just wait over the carrier until they win or get bored...