Would replacing the two cruisers with Type 45 destroyers change the outcome of the Japanese carrier attack?
Short answerAgainst the World War II aircraft, yes. Against equivalently modern aircraft, isolated destroyers would again face a serious problem.
NotesThe counterfactual depends on which side receives modern equipment. Type 45 destroyers inserted into 1942 are judged capable of destroying the attacking formation. Replacing the attackers with modern aircraft changes that assessment. The comparison concerns the balance between an attack and its defenses, rather than treating a modern ship as immune to an overwhelming strike.