They would argue it was a proportionate means of meeting a legitimate aim
No they wouldn't.
That is the allowable justification for invoking the same sex clause in the first place.
It can't be both applied "we are a male only institution which lawfully can exclude the female sex" AND "We will exclude these members of the male sex because they have the PC gender reassignment'. The proportional and legitimate clause allows to legally exclude an entire SEX. It doesn't allow legal exclusion of some members of that sex whilst entitling others.
Hopefully this is reassuring to you. If an institution exists as a single sex exemption, they can NOT exclude members of that sex for having a PC like gender reassignment.
Like I say, you are mistaken.
As to a male person not WANTING to be housed with their own sex, that is a different matter. They are ENTITLED to be. What they are not entitled to is to breach the single sex exemption status of a service for the female sex.
Both sexes have an entitlement to same sex services, or mixed sex services. But they do not have an entitlement to the enforced presence of the opposite sex.