When I worked at a dairy farm, the cows would break out of their enclosure all the time, but then they’d get lonely before they reached the highway, and come right back.
Dairy cows are accustomed to being within a certain distance of the milking parlor. They enjoy being milked. And they usually get quality feed during the process.