(My usual disclaimer: I am new here and not very expert...)

Is it possible he does better at school because there is a more rigid and dependable schedule? Especially if he has trouble transitioning from one type of activity to another -- often rigid and dependable schedules can really help. At school he knows what to expect, he knows when he has to stop doing the fun activity and start doing the less fun activity. At home it's just you telling him to do it, and so he resists you?