OK, add some rocket launchers or drone-bombs to the equipment to take care of those. Manned tanks will go the way of the dodo, they are too vulnerable. The same will probably happen to carrier groups once hypersonic projectiles are common and accurate enough.
Given how vulnerable carrier groups are already against submarines, I don't expect that to change anytime soon. Same goes for tanks so, they are still useful systems. Infantry is walking around anymore, a tank is good in taking out the APCs and IFVs used by mechanized infantry for example.
Thing about war is, losses and fatalities are part of the game. Nobody is assuming to have a silver bullet that is undefeatable and invulnerable.
Submarines are slow, hypersonic projectiles are fast. Fast to deploy to the conflict area, fast to reach their target. Battleships went out of fashion because they were too vulnerable to submarines. Carriers will go out fashion because they're too vulnerable to hypersonic projectiles. What comes next? Maybe a fleet of destroyer- or frigate-sized drone carriers? Submarine drone carriers? Something which makes it harder to disable the task group with a few good hits.
You still have to launch the hypersonic missile from somewhere, and submarines are great for that. (Russia even has specific classes of cruise missile carrying submarines, with missiles nicknamed "aircraft carrier killers").
Submarine aircraft carriers were attempted before without much success, but drones can be drastically slower and do much more damage with modern missiles compared to old school unguided bomba, so we might see a return for them.
Edit: actually i thought about it, and drone carrier submarines would be risky. Surfacing to launch will make the submarine vulnerable ( satellites and what not); launching like a torpedo/missile from underwater might obfuscate that a bit, but for recovering the drones there's no way around it. Furthermore, actively controlling the drone would emit signals which can be detected by the enemies, and preplanned missions seem to be of limited utility in a naval environment
Why would you recover those drones? Just blow them up on target or when no longer needed, simple - just like you do with missiles. The advantage drones can have is a longer loiter time, missiles are a lot faster -> combine the two by having a sensor network of drones mapping the target area, directing missiles to their targets. Add a shaped charge to the drone to give it the ability to do something useful if and when the opportunity arrives.
So, launch a flock of drones while submerged - these could be launched from a single canister containing many of them - and have them move to the target area while hiding in the radar echoes of the waves. Once there have them all pop up to their working height where they map the targets and direct missiles towards them and/or damage/destroy targets themselves. Remember those through-the-window missile strikes in the gulf wars? That thing, but more accurate and a lot cheaper.
Come to think of it, that launch canister can be attached to a torpedo engine so the sub can stay well out the way.
Because presumably they cost money ( more than a cruise missile in any case), and reuse would be practical. But indeed, cruise missiles are already in the hundreds of thousands USD price range per unit, so single use drones wouldn't be something extraordinary.
Of course they cost money. Clearly they also cost less money than a cruise missile. maybe you're thinking of Reaper-style drones? These won't be like that, they'll be closer to the Switchblade [1] which is now being sent to Ukraine. Those are single-use "kamikaze" drones for use on the battlefield, the seaworthy version would be similar. The article does not mention the unit cost other than stating it is "less than anti-tank missiles like the Javelin".
Indeed that's very cheap and single-use is a no-brainer. The firepower isn't great though ( "equivalent to a 40mm grenade"), especially in a naval engagement ( the original discussion). You'd need more than that to sink an aircraft carrier; however if the idea is just to render temporarily inoperable, well targeted strikes ( against an aircraft carrier deck, a frigate/destroyer radar/missile launcher) could be enough-ish.
That is the Switchblade 300, I assume something more akin to the Switchblade 600 [1] would be used for which I can not find any price information other than it being "cheaper than a Javelin". It seems the US Navy has already show interest, albeit for use by surface units:
On 31 March 2021, AeroVironment was awarded a USD26.1 million contract by SOCOM for the Switchblade 600. The system addresses the United States Naval Special Warfare Command's Maritime Precision Engagement (MPE) requirement to engage asymmetric threats with Combatant Craft Medium (CCM) and Heavy (CCH) boats acting as host platforms.
Battleships went out of fashion because the carrier was a better platform for projecting power. Submarines cannot project power, because power requires visibility, while submarines cannot be visible. Carrier are unlikely to go out of fashion unless something better at projecting power is developed, and right now the aircraft that a carriers holds is where it's at. It's more likely that the defense of the carrier will improve than something else will come along to displace it, because the carrier doesn't hold it's own defenses.