My son went through the same thing. I cut out dairy and kept breastfeeding. It seems to make things easier.
My son has an allergy to milk protein, it made him really unwell. The doctors kept ignoring me so I went to ED who told me what was wrong. He’s bf now but when he’s on formula he’ll have to have a formula ,prescribed by doctors, where the protein is scientifically broken down. Apparently it’s quite common, it may be that as the basis of most formula is cows milk xx
What formula is it, and how long has she been on it? We’ve had a similar experience, and was told it can take 6 weeks for the dairy to leave their system. (Depending on the milk you’ve moved to as some still have dairy in)