When I had my child care center I had a mom call me one day to see if I had any opening for a toddler, a 4yr. old and a school ager that went to a school I took kids to. I rearranged a bit so I could take them and they started the next day. I found out the mom had driven up to the previous center the day before and her toddler had been sitting in the parking lot playing in the gravel, his class didn't even know he was missing. She was obviously upset. I can tell you that child was Houdini. He could undo every safety latch I had, he could open any door in my center, he found his way in the kitchen, my office, etc...I nearly had to hire a teacher just to watch him. I had to terminate them after a month or so, I just couldn't keep up with him and watch all the children. They went back to the same center they had come from. They kept their kids there until they were too old to go anymore.
So, I imagine the teacher had missed your child and been upset when she couldn't find her on the playground. When she finally found her she may have been a little more upset and the scolding was a bit harsher.
At K's preschool they prop the door open and if a child needs to go to the bathroom one of the teachers take them and the other ends up with all the kids for a few minutes but the one inside can still hear what's going on outside. Talk to the teacher to get the whole picture. If she was out of line in her conduct in anyway that is abusive then report her to her Director.
If you need to tell her to not talk to your child that way then do it without your child present. Your child needs to see you being supportive of her teacher. If you undermine her authority in the classroom it could cause your child to think it's okay to not listen to her.
When I was a nanny for several years I had a situation come up where I told a child to do something and they looked at me like I was nuts and wouldn't do it. I put them in time out and they told their mom on me when she got home. The mom told all her kids that they had hired me to be there when they couldn't and it was the kids job to mind me, if there was a problem with what I had asked them to do she would talk to me. Then she asked me to come in her office and talk. She informed me the kids weren't allowed to do what I had told them to do and she would never tell me that in front of the kids because she wanted them to mind me. That it would undermine my authority. So I always tried to remember that lesson.