I believe this to be a failure of safeguarding and a risk to every female in the school.
I do not believe the school can give consent in any way, all children are under the age of 16, so they cannot either.
The school in question has adopted the Brighton Trans Inclusion Toolkit which actively encourages males and females to share spaces, including sleeping, without any supervision. They also have unisex toilets.
For the record, I believe all gender questioning children should be given full, dignified support for their schooling. However their needs do not supersede safeguarding and dignity of all female pupils.
What would you do? What legislation, guidance, rules would you quote to them? Straight to governors? The police? What?