For us, it only got better once we realized baby had CMPA and we (EFF) switched to amino acid formula and started using probiotic drops. My kid is weaning and still struggles a lot if she has a lot of high-fiber foods or dairy products. Her GI system just needs more time to work out challenging food. I do recall the newborn days being pretty rough with GI stuff, but it's hard to parse if it was developmental or that we were unwittingly giving her stuff she was allergic to.
What other symptoms did your baby have that made you realise it was CMPA? We concluded a while ago that she doesn't have it since she has none of the symptoms like blood or mucus in stool, vomiting etc. but I wonder if there are cases of CMPA where the only symptom is painful gas. Hope it's getting better for your little one!