I haven't read the replies. My kid who used to be a bit like this has ADHD and Anxiety. When we dealt with the anxiety, which took years to get to an acceptable baseline, this stuff went away. Or it got down to a totally manageable and acceptable level.
My husband had a lot of trouble seeing the Anxiety at first because he came across as super confident in an I-know-better-than-you-do kind of way. But the rigidity and intensity were there, and the ADHD surely contributed to the lack of awareness of this tone or attitude on others. Again, once the Anxiety was managed, he looked very different.