I have two students with the same name and surname in junior high school, but they both have their own nicknames, so students can easily distinguish them.
As for teachers, teachers are not fools. It doesn't matter whether they can distinguish themselves or not!
Afraid of embarrassment, then go to the class teacher to change your name. I mean, only use this name in class, use your own name in exams and so on. Tell the teacher clearly, and the teacher will understand you.