My opinion is that the law will no more decide 'what is a woman' than the law decided that slavery should end, or homosexuality should become accepted. These decisions were and will be taken in the court of public opinion and the law will ultimately fall into line with how people think, as it did in the past.
Hopefully, what we are seeing now are the last battles being fought as the rearguard of conservatism desperately tries to hold onto its ground. We last saw this happen in the UK with 'section 28' which was passed in 1988 and forbade local authorities from promoting homosexuality.
Section 28 was pushed through with enormous passion by government amid tremendous sturm und drang and the argument was that it would prevent young people being 'indoctrinated' to become gay. Even at the time a lot of heads were shaken at the idea anyone could believe this was credible, let alone possible.
Not one prosecution was successful brought and Section 28 was repealed in 2003. Even then, there was a conservative rearguard action to try and resurrect it, but in the end the Conservative Party leader and Prime Minister, David Cameron, ended up offering an apology to the gay rights movement in 2009. It was a historic moment but he was honest enough to face up to the fact that society had decided the law was wrong.
So if we keep our hands on the tiller and steer the path that transgender charts, chances are we will win the war. Maybe lose a few battles along the way, but if my nails get chipped in the fighting, a file is always available. I'm in this for everyone, whatever sex they were assigned at birth, where on the trans spectrum they lie, and whoever is discriminating against them. We hold our ground, together.