I would be careful to fall into doom and gloom "everything is made obsolete by drones" trap that many people are strangely obsessed with, given how it has not proven to be true.
Naval drones utilized by the Houthi's in the Red Sea and the Ukrainian's in the Black Sea have had absolutely horrid success rates, that is especially notable in the case of the Russians who have nowhere near the training and equipment to counter small boat threats. Naval drones are no different than dealing with massed small boat attacks, frigates like CSC are easily able to counter these threats through their main, secondary and even tertiary guns found aboard. There was recently a Houthi USV destroyed attacking a civilian tanker by armed guards firing FAL's off the bridge wings. Missiles are also effective in dealing with these systems as well, the Russians have begun using helicopters to slaughter the Ukrainian USV's to decent effect. Look no further than the countless USV's and aerial drones piled up by the task forces operating in the Red Sea.
Aerial drones are similar, easy to punch out of the sky with basically any system found aboard. There is plenty of developments that can deepen magazines aboard warships to better deal with swarming threats, that isn't even touching on the electronic warfare element which kills more drones in Ukraine than any other means. CSC is planned to be batch constructed, so it seems doubtful the RCN will sit back and let their vessels rot into irrelevance. Look at changes such as the removal of CAMM for RAM, they are adapting the design already to changing situational requirements. Warships are large floating mounting points with ample crew and power generation to run sophisticated jamming and spoofing, considering they already do in the case of ships like CSC with their current electronic warfare and decoy suites.
I don't see any trends that point towards surface vessels like CSC becoming irrelevant anything in the foreseeable future. People have been saying that the tank is obsolete or irrelevant since its inception but here it remains, a vital part of most land forces.