"she was only enforcing the rules of the school..."
The school that requires compulsory attendance, which is the first initiated violence. (Next you will be talking about circus animal trainers "only enforcing the rules of the circus".....) If attendance were not compulsory, our hero would not be in the classroom in the first place, but would be playing his Switch peacefully somewhere else.
But for the sake of argument, even pretending this was a voluntary school where Switches are prohibited, if a student shows up with a Switch, the correct reaction is to expel the student for breaking the rules. Similarly, if someone smokes in a non-smoking restaurant, the correct reaction is to ban them from the restaurant, not to take their cigarettes!