how to help Baby keep soft đź’© ?

My baby is 5 months old, we’ve tried multiple formulas since birth and he used to scream and cry 24/7 bc he’d have diarrhea and also would vomit a lot. Thinking maybe it was a milk allergy, we switched to soy and he’s been on that for about 3 months, bc it seemed like the best one out of all of them BUT it makes his poop so hard so we have to give him prune juice every day so it’s normal “mush”, but the juice makes him really gassy some days which makes him miserable once again. I’ve tried apple juice, pear juice, Karo syrup, probiotics...none of it makes it soft.

Should I go back and try a “milk” based formula again since he’s a bit older?

Or do you have any suggestions on how to keep his poop a normal “mush” with still eating soy?

Yes I have talked to his pediatrician and this is why I have tried everything above. I plan to call again. But I just want to see what other moms have experienced.