Sounds like you have a kid that copes with underchallenge by "running away" and tuning out.
I can say that there isn't always that level of volition to it. And maybe it's where the line between gifted and ADD gets fuzzy. Being computery, in college my dad had asked if I would like to help him enter some data into his Commodore-64. Lists and numbers, I sat down, happy to help, got maybe 10-15 rows typed in and literally fell asleep at the keyboard.
Though I agree, making the context richer helps, but for me trying to find a deeper take on it and imagine questions I might look up and speculate on, etc. are most engaging. I also remember in school trying to figure out who in class understands the material and who doesn't and contemplating ways it might be presented better. Anything to stay on topic and bring a more top-down perspective on things. Those are skills I've found quite useful professionally.