I knew one horse who did this literally her whole life. We all thought it was just something she did since we tried everything, but she recently had to be put down because she had a tumor in one ear that even the vet didn't find until it was too late. Generally, head tossing can also be a sign of an ear infection or ear pain, so I suggest getting his ears checked as well.
Maybe the bit is too much for him?
He is most likely just reluctant to push forward to contact. Keep your completely hands still in this case, and apply more leg. It could also be good to get his back checked for stiffness and ask your vet about head shaking syndrome.
He probably needs a big gallop. It could also be that if he has a big bit that it has been causing sores in his mouth and he could be acting like that in pain.