Exactly this.
They may have been unkind to someone who is vulnerable and they may have used inappropriate terminology to discuss mental health issues.
In which case, the professional educator in the situation asks them to stay behind. Asks for their version of events. Explains that they are part of a class/school community in which they show kindness and tolerance to each other and where you can have your own view on things but that personal attacks or making others feel awkward or sad is to be avoided.
This teacher has decided their guilt because whatever they said/did or believe IT IS NOT PERMISSIBLE TO QUESTION SOMEONE'S IDENTITY.
She starts the conversation in a combative and accusatory way, she shouts them down, she attempts to shame then and she repeats inaccurate and untrue assertions in a tone that coerces then to acquiesce and agree.
She's inarticulate, factually wrong, unclear and confused in her points and delivery and threatens children with more senior adults, worse consequences and tells them they are not welcome in school.
For me, almost the worst thing is her telling them that them being sure their parents would want to be part of the conversation and would support them "well that's sad isn't it" as it's so much a feature of this movement. Undermining the trust children have in their parents and that they will support you when life gets confusing, that they are likely to be your best supporters.
I DO feel sorry for any teacher caught up in this nonsense. I DO feel sorry for this woman being individually exposed in this way.
But it cannot carry on, it needs to be exposed like this.