I would like to humbly disagree, again. If you would like, I can dig up all the Educational Psychology, Science Education, Higher Education, and Elementary Education research articles I have read that say otherwise. Even with students like you, a positive effect on learning has been reported. Here is a great book to look into that takes into account many years of teaching science and collaborates with many science teachers to fine tune a method like this: https://www.amazon.com/Next-Generation-Science-Standards-States/dp/0309272270
Here is a website to take you to next generation science information: https://www.nextgenscience.org
Here is a website to take you to Ambitious Science Teaching: https://ambitiousscienceteaching.org
I can give you the resources, but it’s up to you to read them and look into the research. In a scenario like the one you are discussing, it is the teacher’s job to gauge whether or not a student responds well to this sort of calling out. It has been shown to be helpful in the learning process. Even with a student like yourself, there has been signs of growth. You might not of liked it, but it most likely benefitted you. If anything, unless you had a social disorder or anxiety disorder, it most likely helped you progress socially which is important in academia as well. New Science Academia puts heavy emphasis on collaboration.
I don’t want to invalidate your personal experiences. I’ve been there, too. It sucks to be called on and blank or not know the answer. Still, there is a TON of research that is beyond me in which it states otherwise. As I mentioned, I’ll get you that research if you want it.