I’m new to posting so forgive me if this is not helpful.
I did a lot of similar things at school, with a good teacher I learnt a lot, behaved fairly well and for the most part didn’t attack children or teachers.
When the good teacher left I didn’t do so well and was very anxious and even with medication acted out, to the point I was no longer welcome at the school, at this point I was around 10 years old and on Ritalin.
I moved to a school where the teaching staff understood that I could become bored or anxious and allowed me to leave my class to work in IT or mechanics which I enjoyed, I left school with good results, which considering my concentration level was surprising.
The medication aside, as I haven’t had the ones mentioned in my experience if I was given something that interested me, even in a classroom situation I would focus on it and have no problem, when I was bored well that’s another story!
Hope I didn’t get too far off topic!