Your dog’s behavior could have a variety of motivators from being fearful to being territorial or even just being frustrated that they can’t meet the other dog. Nonetheless, here are a few things to try, but we suggest contacting a professional dog trainer that can see your dog’s behavior in person and provide a customized plan. Since the behavior is relatively new, you should be able to get them back on track quickly:
First, bring extra yummy treats when you walk with your dog. These should be treats that they ONLY get when they see other dogs. As soon as you see the dog, start praising your dog lavishly and give them a treat. This will help them learn that dog equals treat. If dog equals treat, then there is no reason to bark and lunge. Keep treating your dog as long as they are calm and try to create enough distance between you and the other dog so they don’t react.
If your dog does react, calmly say “nope,” block them for a moment with your body, then turn and walk away from the other dog. This creates distance between them and the dog and should help to calm your dog.
Try to stay as relaxed as possible when you see a dog or if and when your dog lunges. If you react when they do then you will only add stress into the situation.
Also, make sure the walks have structure. If your dog is allowed to pull on the leash, stops to sniff every 5 feet, and pees on all of the trees, then they will think that they are walking you. This means they won’t listen to you when they see another dog. Practice having them walk next to you on a loose leash. Have them sit multiple times on a walk just because you asked them too. You can also change your walking speed or normal route. All of these things will help your dog learn that you are in control on a walk. If you are in control, then they need to listen when they see another dog.