The Witch Boy, by Molly Knox Ostertag
In Aster's family, boys are shapeshifters and girls are witches. That's the way it's always been, and that's the way it will always be.
Breaking that rule would not only go against generations of tradition, it would change the known rules of magic.
And, according to family lore, it could be deadly.
The thing is, Aster is drawn to witchcraft in a way that he's never been drawn to shifting. Even more, he knows that he's capable of spellcasting, whereas he's never even come close to either finding his shifter form, let alone actually, you know, shifting.
His family knows about his interest in witchcraft—he's been caught spying on the girls' magic lessons again and again—and his trouble with shifting. But the combination of fear of the unknown, horror stories passed down across generations, and resistance to change results in reactions ranging from trying to convince him that "it's just a phase" to mockery to outright anger based in a fierce protective jealousy of his interest in something that, according to years of tradition, doesn't belong to him.
I loved The Witch Boy.
For the most part, his family—or, well, his immediate family—isn't hateful in their confusion about and resistance to his difference. They're concerned and they want to help him and they clearly love him:
That said, the book is ALSO honest about how despite their entirely good intentions and their huge love for him, their attitudes and actions hurt him, push him away, make him question his own worth as a human being.
Obviously, this whole conflict can be read literally, as a story about magic; it can be read as commentary about the damage that strict adherence to "traditional" gender roles can do; it can be read as a story about identity; it can be read as all three, and it works beautifully on all of those levels. And it shows how strict, unquestioning adherence to those "traditional" gender roles can breed distrust and contempt and hatred in multiple directions, including inward.
It touches on how lack of acceptance can lead people to make choices that are Not Great; it pushes back against expectations in unexpected ways; it shows a non-magical character being not only brave and stalwart in the face of danger, but also actively helping in non-magical ways. It's warm and smart and funny and scary and, again, honest.
Also, there's a Steven Universe cameo! (That bit made me squeal in delight, because it was so unexpected and so perfect.)
I JUST LOOKED AND THERE'S A SEQUEL OUT THIS OCTOBER OMG OMG OMG!!!