Goats need a good fence, food, shelter, and other goats. My goat don't waste time looking for a way out. I range from 13 (base herd) to thirty something. They have at least 14 acres of pastures and woodland.
Goats are kind of like bees. If there's a problem, time to change something. I have seen other folks goats get out and make a bee line straight for the hood of a car.