I'm sure I said this before at length on a thread about three years ago, but to save searching for it.
I think there are situations where our historical legal definition-space chafes against a steadily improving understanding of the wider range of ways there are to be a human.
Existing laws were drafted, debated and enacted within the cultural context of the time. It's clear that wider cultural changes have highlighted the fragile house of cards that much of historical equality legislation is built upon; we built laws that used a definition of 'sex' to mean something that was rarely publicly contested and nowadays is a great deal more so.
When we exist in public, we don't actually in practice categorise by (the massive oversimplification that comes under the heading of 'genetic') sex. We categorise by gender expression, which is a chaotic and vague mess of different factors and stereotypes. If a person looks 'male or female enough' to assign them a category one way or the other then, because we have been trained from birth to see humans as only one pole or another on a range of expressions, we do so.
This approach of hammering every person into a 'male' or 'female' hole is increasingly revealing itself to be woefully inadequate - not just ideologically, but practically. It feels like stumbling across a vast quarry in a previously flat landscape - even if you fill the quarry back in, it will take a long time for the ecosystem to stabilise and it will never be quite the same again. We can't just return to a 'binary' world - because it was always a strained fiction to begin with.
The law does not dictate material reality but it can be a useful tool for guiding behaviours and creating a general sense of the kind of society we wish to have. The GRA is shit concessionary legislation, but it's a hell of a lot better than no legislation because it clearly says that we take at least some trans people seriously enough to protect them. The Equality Act, meanwhile, is pretty good - binary sex-based provisions are increasingly conceptually strained but they are in some cases necessary, and the inclusion of the phrase 'proportional means of achieving a legitimate aim' was very carefully and wisely chosen.
Can we do better? Absolutely. Is there a desperate need for frank honesty in culture-wide discussions around safeguarding and single-sex facilities and how we transition from one shit solution to a slightly less shit one? Absolutely. Am I confident that it will be possible to have these discussions in any meaningful way while they are a charged electorial issue? Not really.