Your story reminds me one of typical case with smart kids that you can have with smart kids that are being told they are smart all the time. I don't say it is your case, but this answer may help people in the same situation: kids refuses bad judgement of their performance or become perfectionist (perfectionism can become a pathology).
To illustrate why it is a problem, let's take the opposite: Someone tells his kid all the time he sucks. Even in front of other people. What happens is classic: the kid tend to start to believing it. He really thinks he sucks. This (irrational) feeling will follow him for the rest of their life. He modeled his kid to have very bad self-esteem. This will potentially lead to psychological problems in the future such as depression or anxiety.
Telling your kids all the time he is so smart (or worse, smarter than the others), may lead to the same type of problems: too high self-esteem. This leads to the behavior you describe. The real problem with that, is that your kid is going to face failure. This is where your kid will suffer. A lot.
Another problem you could face is "temporary" smart kids. They are just a bit advanced on their cognitive abilities by having more myelin stealth than average. That stabilizes at age of 12. A kid can be smarter at a certain age, then stabilize at another... biologically.
So what to do? Robin summarize it pretty well in one article on the subject he wrotes.
The key to praise is specificity and encouragement of effort, rather than the token, "Great job, Timmy! You are so smart!". Instead, a teacher may say, "I noticed you really thought about how you were going to construct that paragraph, Timmy," or "Look at the vibrant colors in that picture. I notice how precise your strokes are."
The later examples encourages the child to keep up the effort and work toward their goal rather than stopping the process because their work is already great. What is the motivation for the child to continue a project if an authority figure has already given it the thumbs up?