Try patting his head softly after he eats or wakes up, he won’t feel like scratching you. Once he feels how good it feels, he start to warm up to you.
im serious uhuh
cats scratch it doesnt mean they hate you;;
like my old cat used to scratch my head massaging it
she'd sit on the top of my head and run her paws through my hair while i lied down, and she loved me to death