Electric netting keeps out predators even bears, as long as it’s good and hot. Solar often isn’t, unfortunately.
Keeping goats in a free range situation usually requires some combo of electric fencing and livestock guardians, dogs being far and away the most reliable.