My daughter has absence seizures. Have them do an EEG on your son. It does not hurt but can be scary for the kids. They stick wires to the head (with a paste). I bring books with me to read to my daughter to distract her. You can also ask to have it done in a room with a tv to help distract him. It is a simple test that will not take long to do. It is worth having done to rule out seizures.
Good luck!
It's not unusual for young children to become 'lost in their thoughts' for a bit, and you likely have nothing to worry about. Is it possible that your son is displaying a variety of seizure disorder called 'absence seizures'? Yes, it is possible. Call the behavior to the attention of your son's pediatrician; see what he/she thinks.
If you notice him "spacing out" relatively frequently, and not just when you are talking to him but sometimes at other times, it might be worth ruling out a seizure disorder. There is a type of seizure called partial complex seizures, also known as absence seizures, where the affected person doesn't lose consciousness, simply seems to be inattentive or unaware of what is going on for a moment. Just a thought. Good luck.