It would seem that way if a carrier had to fight the whole engagement by itself. But it doesn’t. It’s a very integral part of a larger whole.
Wrapped around that carrier is a whole task force that sometimes is devoted to the defense of that carrier. These support ships can be missile launching cruisers, destroyers, frigates, and yes fast attack submarines. Each of these elements lends support for each other: the aircraft from the carrier can protect the surface vessels. The missile carrying cruisers provide a layered defense to prevent, or try to prevent aircraft and missile from getting to the carrier. The destroyers and submarines protect it from threats below.
It is very doubtful that Aircraft carriers will never be obsolete. It’s like the feud that existed during the 1950s between the navy and the air force concerning the practical necessity for a navy now that we had bombers and missiles. What everyone forgets is presence or projection of force starts with being there with force. Ships of any type will never go obsolete for that reason.
Hope this helps.
“If we should have to fight, we should be prepared to do so from the neck up instead of from the neck down.”— General James H. Doolittle, USAAF