A trick I learned is to respond "Oh, ok", at a certain point.

Debating something is, as my grandmother said "the ultimate concession", you only ever really debate something if you feel that there is a chance you are wrong. If there is an impasse, and you are confident in your response, there is usually no reason to continue, especially when there's a teacher-student asymmetry, they take it personal, and you gain nothing but make an enemy out of your teacher and spend your "question" points.

There's only so many times you can interrupt a professor, and spending your question points on correcting them isn't very useful to a student. And that the student believe that on one ocassion they know more than the professor, does not mean that there is nothing to learn from the professor.

Both of these mistakes (overextending a challenge and conflating a specific dominance over a general dominance) I think often come together under a personality trait that is generally identified as "arrogance". I do think there's a middle ground between believing one is superior and dropping all contentions of giftedness, but it's a thin line, and I think it's especially notable when the difference in talents (between the student and teacher, or between the gifted child and the average) is very marginal anyway, if it's undisputable then most tensions dissipate with the clarity.