Help baby with constant constipation

Ashley

So a little back story my baby was diagnose lactose intolerant at 2 months old. After getting off breast milk and fonalky getting on a good formula (around 3 momths). Which is elecare. Everything seems to be good. He would occasionally get constipated but i would give him 2 oz of prune juice and he would have a diaper blowout then be fine. I started baby food at 5 months. And now he is 6 months old and all of a sudden he just cant seem to poop. He was really constipated a couple weeks ago and when the poop came out if was huge and tore him a little bit. I have him prune juice and it didnt help. Now he keeps getting constipTed the dr put him on miralax and said to give him prune juice too. That didnt help so to get him to poop we had to give him milk of magnesia. And he is still having trouble pooping. She referred him to a gi dr but we havent gotten in yet. Any advice on what it could be or what to do to help? Ive even tried giving him glycerin suppositorys and tht would hell before when he would get really backed up but they aren’t helping anymore ( he has only had them 3-4 times in his life)