Yes, T23 was eliminated on the basis of cost - as, in the end, was the M although it was not just shipbuilding costs between the last two. The T23 we were offered, while not as competent in ASW as the RN version, was still pretty good. And yes, in its day the T23 was the best surface ASW platform in the world - and by quite some margin.
And I agree with Volk, had a like for like on the T12s been the aim, ie ASW primacy, T23 would undoubtedly have been the choice. But at the time the submarine threat in our part of the world was pretty low, and other factors were deemed more important.