Why did the Type 41 and Type 61 struggle for orders, and why did the Type 23 receive a 4.5-inch gun?
Short answerThe general argument is that a frigate needs useful peacetime tasks as well as a wartime specialty, and a deck gun supplies land-attack and presence options.
NotesA frigate designed around one wartime specialty can be difficult to employ on peacetime presence missions. Continued orders can preserve yard skills and jobs, but that industrial benefit still leaves the navy needing useful work for the completed ships. A Type 23's 4.5-inch deck gun adds shore fire and an immediately visible means of exerting pressure during a deployment. Those tasks make an anti-submarine vessel useful when no submarine is being hunted. The question names the Type 41 and Type 61, but the reply moves into a general ASW-specialization argument without distinguishing the two designs' individual equipment.