Majority of the tyranny & how constitutional law prevented that
We don't have a constitution in the Australian sense of higher law. However, we are part of the ECHR. European Court of Rights which is implemented by the Human Rights Act 1998. Any citizen has the right to bring cases under this act.
The most relevant is probably Article 8 - right to private life. Transfolk have the right to have their legal sex "recognised" under UK law. The original case was a transwoman who didn't want to use her "birth sex" ID to an employer. Under another ruling that recognition cannot depend on any medical treatments, i.e. hormones or surgery.
Since that case, they also have specific protections from discrimination and harassment under the Equality Act 2010 under gender reassignment (as well as age, disability, marriage and civil partnership, pregnancy and maternity, race, religion or belief, sex, and sexual orientation). There are specific areas where it is permitted to discriminate and separate, or even required to prevent disadvantages.
The Supreme Court clarified that sex has only meant biological sex in the Equality Act, so biological women are a protected characteristics. That means services and facilities can be provided to biological women.
Some men said "I'm a woman" and therefore I can go in women's only spaces / have a job role that is only for women / use rape crisis centres that are women only / enter women's only spaces anything else is illegal.
The court case wasn't about loos per se it was about the very legal existence of biological women and that in some cases our rights aren't compatible with giving transfolk what they wish.