The trouble with teachers like this is that they make the child the subject of the battle. I understand the issue about compelled speech but schools should not be the battle ground for this.
Indeed, they shouldn't, but I see the teacher's point of view.
I don't know how large classes are at this school, but at my school, we were so many children in my class one teacher forgot my face and asked me who I was when she met me outside the classroom.
She certainly wouldn't have remembered my gender identity.
There will, inevitably, come a time when a teacher will not be able to remember everyone's gender identity anymore, and it is only prudent to put one's foot down before that happens.
After all, it wouldn't be fair to decide that the tenth transgender child in the class has no right to their chosen pronouns when transgender children one to nine get their chosen pronouns.