Such a child is autistic to some extent, and he thinks that everything outside has nothing to do with him.
Usually, if someone is friendly or concerned about him, he will still keep it in mind and even go home to show off.
In fact, he didn't mean to disturb the class order, but these things were too strange for him to understand at all.
I suggest you pay more attention to his every move, understand his preferences and habits, and pay more patience and attention to him. After a long time, he will find that you are good to him. Slowly, you can tell him some simple truths, tell him that it is wrong to talk casually in class, listen to the teacher and study as hard as other students (even if we know what he can't do, at least we will).
It won't be long before you find great gains.
Wish you success!