My daughter is incredibly intelligent. I won't bore you with my "proud parent" stories, but I'll share one of the aspects of giftedness that caused her a lot of issues.
In her early elementary school education we used a curriculum that dressed up what we used to call "programmed learning" in fancier sounding verbiage. When she got 80% on a multiple guess test, she had "mastered" a unit and moved on.
This allowed her to progress quickly, at least on paper. However, when she was expected to put he knowledge into practice in 4th grade, she realized instantly that she was way behind the other kids. Her ability to skim the material and pick it up without effort had left her with no depth of knowledge and the expectation that she could learn anything in 2 minutes. Her reaction to more complex problems that required focused effort over time was to avoid the work because she realized she didn't know the material, in spite of having "mastered" it.
Her expectations had been set that she could learn anything in no time, so if it took time and effort she thought she was stupid and would refuse to try.
Part of the curse of being gifted is that kids don't have to work as hard to learn the material, so they don't work as hard and don't learn the non-academic skill of putting extra effort in to achieve a goal.
Edit - suggesting resolutions
My daughter didn't act up in class. Instead she would sulk and simply refuse to do her work. However, the core dynamic may (or may not) be the same.
For our daughter, it took a few all-nighter sessions with the two of us, forcing her stick to the task and rework her homework until it was of good quality. Once she realized that expertise was a process, not a state, she became comfortable with the idea that "mastery" for a 6 year old was "sub-competent" for a 9 year old.
As her work habits improved, so did her skills. As her skills improved, so did her self esteem. As her self esteem improved, she began trying to learn the extra step. In 5th grade, her math teacher was giving her extra enrichment work until, whether it was for a chuckle or out of frustration (I will never know), he gave her a binomial division problem. She solved it on her own, albeit with some frustration because it didn't reduce to a single number.
It was still 8th grade (and a few more all-nighters for the two of us) before she was comfortable with the idea that revision was a normal part of any work.