I've had beagals all my life. They have a very sweet disposition and make great family pets. The bad part about them is they may be the stupidest breed of dog there is. Since they generally are a little slow folks don't expect much out of them. Just to be a pet, or chase animals. When they do run off they just dismiss it as their nature. In turn they just do as they wish and don't really get the pack instinct instilled into them from their owners.
The easiest way to cure him is a remote trainer. For what ever reason most folks find that cruel and detest even the mention of it. But it will cure the problem instantly. The same owner will let his dog run wild, destroying other peoples property and maybe even let the dog get injured, ran over or shot from his carelessness, so cruelty is a matter of oppinion.
Although not as effective you can whip him. The problem is you can't catch him. He knows he's doing wrong when you are screaming and doesn't care. You don't matter since you can't do anything about it. There's no reason to beat a dog, but they need to understand doing something bad hurts. It's better to swat one to teach obedience than to leave him to his own devices and really get hurt or killed by not minding. They need dicipline just like a child. The problem with a beagle is when he finally comes back, he's so dumb he won't know what he did wrong, if you start whipping him on his return. So if you can't catch him while he is running away and whip him, he won't know why he's in trouble and you are doing nothing helpful by swatting him. They have such a good disposition that there really isn't a need to whip or scold one on a normal day to day basis, so you aren't the boss of him. You just are a lower level pack member and he doesn't have to listen to you. You can walk him on a lead, but once it's gone he still doesn't have to listen because the thing that was making him do what you wanted is gone. So it boils down to a fence, an electronic invisible fence or an electronic trainer.