I figured out something that worked for me with the Desolis trainer Anya, just turn on the skip conversation with npcs in interface options and...
I'm having the same problem with Anya the sun magic trainer, I've completed the mastery quest but she doesn't respond to the train command
Separate names with a comma.