Try to find the owner. Obviously the dog is prone to escaping, and is more than likely someone's missing pet.
The only thing you can do is put up an outdoor kennel or crate the dog in the house. You could consider a taller fence, underground fence (although they're not always the most reliable and pits are very smart), or an electric line around the fence.
Surprised the vet was able to give you such an approximate age. Typically an 8month old dog would be estimated without knowing anything other than appearance at probably a year or year and a half. It's odd you or your vet was like 'ah the dog looks about 8 months.'