Spit up

My baby was drinking reg formula then I made the decision to change him to sensitive because he was struggling to poop and kept throwing up after every feeding like 3 or 4 times in between and was super fussy then his pediatrician told me that wouldn’t do anything and said maybe he had a milk intolerance so we switched to soy instead but he’s still throwing up his BM has gotten better but I’m constantly cleaning up throw up i’ve tried sitting him up after but doesn’t help :( I wonder if something is wrong in his tummy. Any one else?