I believe that if you train your dog the right way and with extreme consistency over a period of time, your dog will obey staying within a border just as much as staying within an invisible fence line. In fact, I believe that putting in the time to teach your dog border training will result in a much lower failure rate than invisible fences, which is currently like 50/50.
As always, it’s important to have high-value treats (freeze dried steak/liver, cheese, or cooked chicken/salmon). My particular go-to high value treat is freeze dried liver and it seems to do the job. Next, you will need border flags which you can get at home depot or your neighborhood hardware store. Place the flags about 6 feet apart along the border you want your dog to learn. If you have 2 dogs, you must do the training 1 dog at a time.
Once the flags are set, leash up your dog and start the training – note, training sessions should be no longer than 15 minutes at a time with at least a 10 minute break in-between. Start with a flag at the corner of the border. Start with your dog about 10 feet from the flag, walk him up to it, say “no!” and quickly walk back away from the flag to about 10 feet away, then have him sit and say “yes!” and give him a treat. Repeat at the next flag, and so on and so forth. Prior to ending each session, walk him along the inside perimeter of the flags, praising him for being on the right side. Then end the session.
Follow the above steps for a few days, and then test your dog’s impulse control with sit/stay’s at the inside of the border. Start with the flag closest to the corner and walk up to it, put him in a sit/stay, and then walk across the border and turn around. If he is still in the stay, walk up and say “yes!” and treat him, then take him away from the border 10 feet and say “yes!” and treat. If your dog crosses the border at any time, say “no” and walk him back with the leash to the spot that he broke command and put him in another sit/stay. Then walk across the border again and turn around. Depending on whether he is still sitting or across the border, you now know what to do.
Next, go to the next flag and rinse and repeat the above steps. Prior to ending each session, walk him along the inside perimeter of the flags, praising him for being on the right side. Then end the session.
If your dog broke command often, go back to the first step of walking him up to the flag, saying “no!” and quickly walking back 10 feet and saying “yes!” and treating. Do this for a full session before attempting step two again with the sit/stays.
Step three involves distractions. Walk your dog up to the first flag and put him in a sit/stay. Have someone else on the other side of the barrier make noises, jump up and down, run back and forth and see if your dog remains in a sit/stay. If they do, say “yes!” and reward heavily. If they don’t stay, walk them back to the spot of the broken command and try again. If they fail again, you may have to go back to step 1 again for some retraining. If they are successful at the stay, move to the next flag, so on and so forth. As always, prior to ending each session, walk him along the inside perimeter of the flags, praising him for being on the right side. Then end the session.
The last step of the process is relatively easy. You should have a release word for your sit/stay, such as “break” or “OK” or “free”. Walk your dog up to a specific area in the border (preferably the driveway) where you want him to be able to cross with you to go on walks or get in the car. When you get to the edge of the border, have him sit/stay, walk across the border, and release him so he knows it’s ok to go across. Practice this often so he comes to know that this is the only area of the border he can cross and only if he hears the release word.