So sorry this happened. Talk to your daughter and let her know that you will talk to her teacher and let her know what she said, and that you will ask her to allow her to go potty, but at the same time to only raise her hand to ask that. Knowing this her teacher should be willing to call on her when she sees her hand go up. Approach her teacher calmly and politely, don't assume animosity or anything negative on her part, it may indeed be that your daughter was worried about disappointing you after being praised for her better listening and behaving. Also use this as a learning tool with your daughter, acknowledge that you know this was an embarrassing thing to happen to her, but that because of all the times she was raising her hand to ask questions, the teacher didn't know. You kind of have to play diplomat as your daughter is still going to be in her class. I'd be upset, too, but hopefully this is the one and only time.