What is the carrier for if the jets it carries cannot stop swarms of drones?
The only thing I can come up with is “war crimes”, but, as Iran pointed out, if you can afford an aircraft carrier, you have trillions of dollars of easily hit civilian targets, so you pretty much automatically lose if the other side retaliates in kind.