I am a swimming teacher specializing in teaching pre schoolers (from 6 months to 5 years) to swim. Your post makes my blood run cold and I would start running from your swimming teacher and not stop. No child should ever go under water unwillingly. Please don't send your child to another lesson with this teacher woman. Long standing fear of water may result.
The twos are an age where fear of water is common and we use many many methods to help children gain confidence and overcome that. I live in a hot country where pools are everywhere, swimming young is the norm and most kids swim every day so its important to learn water safety and swimming from a young age.
I have helped children through this successfully, it can take months and progress isn't regular or linear but it works. We start by washing faces in the pool, putting our chins in, blowing bubbles, submerging up to our noses, dunking our ears to see if we can hear underwater, singing with our lips in the water, hundreds of little games with fun and encouragement. I even took an empty ice cream tub to one lesson with a fearful 3 year old, we had a chat about her favourite ice cream, what it felt like and tasted like before we filled the tub with water from the pool and touched it, played with it, imagined it was ice cream and eventually put our mouths in it to blow bubbles etc. it's a really long road but its built with small baby steps over hours of lessons sometimes. 6 months later, that 3 year old was diving and swimming 3 strokes, all with her face in the water.
It isn't necessary to swim with your face in the water but 2 year olds don't have the neck muscles to swim with their faces out of the water yet so most little ones are taught to swim face in, then lift head to breathe around 3 years old and beyond.
Please cancel all future lessons and let your dd enjoy water with her face out of the water for a long time before even attempting another lesson. If it were me, I would be reporting the teacher to her qualifying body too.