In an ideal world the mother's response might have been "that must have been a shock", or "I would have found that shocking how do you feel about it". Something which didn't over sensationalise the issue or cast aspersions on the other child.
A reasonable discussion about how some people have problems with their bodies could have happened.
Whose version of an 'ideal world' is this? Your ideals don't trump a version of an ideal world in which children can trust their teachers and learn how to believe in the evidence of their eyes.
There would have been no need for children their parents to have been 'shocked' if they hadn't been lied to in the first place.
I can understand the child's parents wanting to watch and wait to see if he grew out of the notion that he is a girl. The advice, however, is to do this without affirming the idea that changing sex is possible. Not only that, but the family don't operate in a vacuum. They are part of a school, and the other children have a right to be considered too.
If the child had changed back to wanting to be a boy, how would that have been handled? If, on the other hand, the child continued to want to be a girl, what would have happened during and after puberty? These are general questions, incidentally - not directed to any poster in particular. I raise them as the situation may seem harmless when it is 'just' a four year old playing with other children, but when that four year old becomes a sexually aware (very different from being 'gender confused') teen there is likely to be a whole new raft of problems that will need to be handled far more sensibly than this has been.