I am in TRENCHES help please

I got my 4 month old aussie pup about 2 months ago. We went through a bunch of puppy blues and struggles with potty training, biting, chewing everything and all that. Everything progresses slowly, he is super smart and learns quickly, but he is terrible with distractions. This morning we went on a walk and at this one park spot I always let him off leash to run around and train recall and stuff. Besides him eating all the sh*t he can find he pretty much listens to me and comes when called. When a person or someone with a dog approaches I always put him back on leash as he goes NUTS. He just wants to play with everyone and everything and will not pay a single ounce of attention to me. It’s like anything is more attractive to him than me. When we walk past people I try to take him off the path and make him sit and look at me and reward with treats. However, if it’s a person with a dog I have no chance. It’s like I don’t exist. This morning he ran away after a female dog we met with earlier. I thought they were gone before I let him off the leash again and he lost it and ran off. I caught him when he was jumping on the girl dog, her owner was really nice about it but I felt so embarrassed. The rest of the walk was terrible too he pulls and would not look at me at all. I understand that the foundation of a good recall is a good relationship, does that mean we don’t have one? It makes me so sad that sometimes he even runs to check on me without being called and is perfect with his recall and stuff and then days like this happen. We came back and while he’s happily napping in his pen I am writing this crying, my day ruined. We start puppy class tomorrow so I am hoping it’ll help with the distractions issue but now I’m worried he’ll be crazy over there too and won’t make any progress. Please help what am I doing wrong??