I'm not sure what you mean by maxed out, you can't really level it up.how to avoid holy church, i have maxed out illusion. i dont understend
But I suspect what you did was read the tome 3 times to learn the spell, and you may have forgotten to purchase it afterwards.
Try sleeping, use cum to learn magic, and see if there's an option to purchase illusion.
If not, please send me your save file and I'll tell you whats wrong.