Teachers have a duty of care not to become like 1984.
If they fail in this duty then they absoluetely should be pulled up on this as individuals.
They can scream about their mortgages all they like. They shouldn't use that as an excuse as to why they are gaslighting children.
If this kid was bullying, then that STILL doesn't change the fact the teacher was STILL telling a child theres billions of genders. Thats like saying I know their religious beliefs are off but you must also believe them too because they are true rather than saying something about not having to believe yourself but the need to be respectful. But worse; the reason the kid is believing they are something they can't be is because they've been fed a load of shit in the first place. Stuff that is frankly a safeguarding issue in its own right. To then ask that everyone else be respectful of the legitimacy of the safeguarding fail and not speak the truth is even more unpalatable. To THEN say its homophobic and that the kid doing the recording should be forced to leave is downright abusive.
There is no justification for what happened in that classroom.
And yeah, that teacher has failed to do her job and she and the senior leadership team at that school, should be hauled over the coals over it. Its not ok on any level.