Legally, it's both. In the UK, the sexes are treated identically in law (tax, pensions, the right to marry, everything), except where the law provides specific exceptions, either for good practical reasons, or because it's what everybody wants and it's harmless.
So, the male primogeniture rule for peerages is considered a harmless tradition, which operates based on birth sex, not GRC gender.
Clubs for people with a shared characteristic (lesbians, Rastafarians, men with sheds) are allowed because on balance they're a social good.
Schemes to boost underrepresented groups (men in nursing, women in parliament) are allowed. The groups can't be merged (eg women and transwomen) because they will be over or underrepresented to different extents and for different reasons.
Service providers can cater for men and women differently and/or separately if there's a good enough reason, including safety, fairness and modesty. It's a given that both sexes are modest about undressing and toileting, and the worked examples make it plain that women fugitives from male violence (eg in DV services) are entitled to exclude anyone who looks like a man, whether s/he is one or not. Similarly, men can exclude women just to protect their modesty, if undressing is involved.
It's hard to see how anyone could object.