Also important to be very clear about 'proportionate' in those exceptions.
It it not proportionate to exclude female people of faith, disability, trauma, culture, many other reasons from a female single sex facility for a male person who wishes to be there.
It is not proportionate to remove privacy and dignity from all female people present to provide privacy and dignity for a male person who is concerned they would not have this in male single sex facilities.
It is absolutely not bloody proportionate to expose female prisoners to the risk of harassment, assault and worse by known male offenders to provide male offenders with affirmation in their identity. The disparity of standards is utterly gobsmacking in its sexism.
The proportionate response would be to ensure that a male person is always provided with a safe, dignified alternative provision.