In home schooling our daydreamer son, I learned early on to ask him what he was thinking about. Often it was math, and our school sessions always went more smoothly when we switched to whatever he was wondering about at the time.
His mind was steered by a powerful internal rudder, and it did no good to try to turn it in some other direction. In a traditional classroom, even one for gifted students, he’d have had a hard time because his powerful internal imperative to think about certain things seemed to rule him.
I wasn’t perfectly flexible, especially at first, but that most important question, “What are you thinking about?” at least helped me understand what was in his mind.