to go in a direction that is away from a group or from the place where you should be
Two cows strayed [=wandered] into the woods.
The airplane strayed off course.
— often + from
She strayed from the group and got lost.
Her eyes strayed from her computer to the window. [=she stopped looking at her computer and began looking at/out the window]
— often used figuratively
She never strayed [=deviated] from the path her parents envisioned for her.
The menu at their house rarely strays (too) far from meat and potatoes.
The class discussion strayed [=deviated] from the original topic.
a straying husband [=a husband who has sexual relations with a woman who is not his wife]