Yes, the effect is called "stereotype threat"[1] in the psychology literature. A professor of psychology who participates in the journal club I participate in is deeply skeptical of how large the effect size of stereotype threat is in the real world. On my part, I like the interventions that have been suggested by the main stereotype threat researchers, to prime students with self-expressed affirmations of their core values to help them boost their own performance.
[1] http://mrnas.pbworks.com/f/claude%20steele%20stereotype%20th...
https://teachersh.scis-his.net/tmrak/wp-content/uploads/site...