expression, ichidan verb
get distracted; lose focus; wander off mentally
Describes one's attention or thoughts drifting away from the current task or topic. Often used when the mind wanders unintentionally.
勉強中に気がそれて、窓の外を見ていた。
While studying, I got distracted and was looking out the window.
話を聞いているうちに
My mind wandered while I was listening to the talk.