Your DGD is lucky to have you and your DD to fight her corner!
Just wanted to add regarding possible repercussions - there is provision in the Equality Act (EqA) for protecting those who seek to assert their rights under the EqA. Part 2, Chapter 2 Section 27 Victimisation prohibits retaliating against someone who complains that their rights under the EqA have been breached.
As your granddaughter has the legal right to single-sex toilets, any complaint she might make that her rights under the EqA have been breached is protected under the Equality Act.
And her case is quite clear:
When you are in a public place like a school, the Equality Act applies. It protects everyone from unlawful discrimination.
What the school has done qualifies as "Prohibited conduct". In this case definitely indirect discrimination and potentially also harassment.
Indirect discrimination happens when a public body like your DGD's school puts in place a policy that has a worse impact on one group of people with a protected characteristic than a group without it.
Sex is a protected characteristic under the EqA. Girls have specific biological needs that boys do not have - they menstruate, boys do not. As you have explained in the case of your DGD, denying the girls single-sex toilets affects them far worse than the boys, because they are denied the privacy and dignity they need to deal with their periods.
There is also potentially a second breach of the Equality Act here in that the school has not only adopted a policy that much more negatively impacts the girls than the boys, but by making the toilets mixed-sex, it has potentially also enabled the harassment of the girls. Harassment is separate prohibited conduct from indirect discrimination and is governed under a separate paragraph of the Equality Act (Part 2, Chapter 2, Section 26).
You could argue that by making the toilets mixed-sex, the school has created a humiliating and hostile situation for the girls in doing nothing to stop the boys from directly harassing the girls and completely ignoring their right to dignity. And as per the EqA, it is only the perception of the girls that matters here, not what the school or the boys think.
Furthermore, the school is clearly in breach of its Public Sector Equality Duty, which obliges them not only to consider in detail how any policy change might affect those with different protected characteristics, but they must have evidence of having done so. So ask them for a copy of their Children's Rights Impact Assessment (CRIA) and a copy of their Equality Impact Assessment in regard to making the toilets mixed-sex.
The former considers the rights of children under the UN Convention on the Rights of the Child (UNCRC) and the latter the rights of female students, disabled students, and students from culturally conservative ethnicities and religions to single-sex facilities under the Equality Act.
Hardly anyone ever bothers with a CRIA btw. But the local authority should have done one before implementing this change as it potentially breaches Article 39 (right to recover from abuse, incl sexual abuse), Article 28 (right to education, esp obligation to increase attendance and reduce drop out rates), Article 16 (right to privacy), Article 14 (right to belief and to exercise one's belief ie sex segregation in toilets), Article 12 (the child's right to have their views respected), Article 3 (the right for all children to have their best interests taken into account) and Article 2 (the right not to be discriminated against and to have their rights under the UNCRC respected).
So your outrage is well founded. This is a terrible solution to a terrible problem, and the school must find a better one.