I totally agree with working on these skills in a low-distraction environment first - indoors or a yard, if you have access. This way the dog will have a history of being rewarded for the right behavior, and some muscle memory of what they're supposed to do, and be much more likely to fall back to those trained behaviors in a more distracting environment.
The likely reason that you have more success off-leash than on is barrier frustration. The dog knows he's restrained to some degree, and can't perform all of the natural behaviors they want because of it. This can increase anxiety and/or frustration - the main causes of reactivity - which makes the dog reach that point where they're so overwhelmed they don't even notice their favorite treats or toys much more quickly. When a dog is in this state, you can't really train. They're too emotionally amped up. Think of it like trying to teach a kid mathematics on a roller coaster or at a Bieber concert (is he still popular? idk, but hopefully you get my point).
The best you can do in the moment is put distance between your dog and the trigger as best you can (I HAVE resorted to picking up my boy if there's no other way to move him past the other dog, but I also know he will not redirect his frustration into biting me; some dogs will, so keep that in mind). Once you've passed the trigger (the other dog), you can reward for calmer behavior and refocusing on you, but so long as he's fixated you're in a management situation, not a training one.
Each reactive dog is different, and different strategies will work better for some dogs than others. I always recommend Patricia McConnell's Feisty Fido, which is an inexpensive booklet that's really short and comprehensive and specifically about this issue, but you've gotten some good suggestions from other members here too. What's working best for my dog at this stage is rewarding him for choosing to disengage from interesting things. We didn't start with dogs, we started with people or baby carriages or the like, because those are less exciting for him. He'd perk up and watch them, but wouldn't go into barking/lunging/whining fixation. When he decided to look away, look back at us, sniff the ground instead, etc. we'd mark it ("Yes!" or "Good boy!" but you can use whatever), jog a few steps away from the trigger with him, and then reward him with treats. Doing this has made him significantly more capable of breaking focus from other dogs and moving away, which is huge for us. Be patient and consistent, you'll probably have good days and bad when working through these behaviors.
I'll say that the other thing that's made a big difference to us is doing long-line/off-leash walks in wooded/naturalistic areas that are mainly about letting him sniff and explore. I do know that this is a luxury not everyone is going to have access to, but if you have the option it might be worth a try. Doing these regularly has been great stimulation for my boy and has a calming influence. He's much more resilient, responsive, and quicker to recover from outbursts on weeks where he's had at least 2-3 hikes compared to weeks where he just gets neighborhood walks and training/feeding puzzles for mental stimulation.