When Invisible Fence works properly, the dog won't "run past it." The dog gets a shock as he crosses the barrier, and he continues to get an increasingly stronger shock as he continues to leave the property. He is strongly motivated to turn around quickly
and get back to safe turf. That's how it worked on my dog.
My problem was, the fence ran under our gravel driveway which is bedded in sharp stones, and the first time the trash truck ran over it the fencing was damaged and lost its integrity. They charged me $500 to come find and repair the break, and did not think to embed the wire in sand so it wouldn't happen again. I'm not paying another $500 to have them repair it again, although it might be worth it. My idiot dog went up the road and called the neighbor's dog's mother naughty names and nearly got his rear leg torn off for his trouble. That cost me a pretty penny in vet bills. ...
There's a portable electric fencing system that allows you to take your dog with you on outings. Basically you become the center of the bubble and the dog has an area around you in which he is free to roam. But the same problems apply that others have mentioned, it keeps your dog in the bubble but does not keep other dogs out. A good slip-chain ("choke") collar properly fitted and installed, and six-foot leash, in my opinion, are always the best way of controlling your dog when away from home, along with good basic training (Heel, Sit, Down, Stay and Come).