They just don't bring it into the classroom.
Most schools have gender neutral uniform options: there is no need then for boys to wear skirts. No child should be using changing or toilet or sleeping spaces for the opposite sex at any time, additional spaces provided as needed for privacy and dignity. No changing the child's name from what they were registered as. No getting involved in discussions about gender, it doesn't enter school and isn't relevant at school, and unqualified teachers shouldn't be influencing or getting involved in this. The child at home can do what they and their family choose, but there are limits to what comes into school in terms of self expression, as is standard with hair, clothes, jewellry etc. Reduce the fuss and specialness and excitement of it all. And no dodgy clubs.
It should be a neutral space, neither encouraging nor discouraging, and this not only means no risk of influencing and encouraging a child based on adult agendas and feelings, but also guarding against locking a child into something that will be hard to row back from should their wishes and feelings change. Surely this is what really matters, that children going down this path do so without being pushed in any direction, and that their options are kept as open as possible for as long as possible to avoid disasters like Keira Bell's?