7 mo. old hasn't pooped in 10 days

Amanda • FTM to Niklaus Eli 💚 Now second baby is on the way 💚💚 Due July 25th, 2023

I'm getting very worried. Here's the full story.

My son went 5 days without pooping and then I gave him Mommys Bliss constipation ease and that helped. He popped 4 or 5 times over the course of 2 days. Then on the 3rd day he stopped pooping again. The constipation ease did not help this time. I called his doctor and made an apt. He had me give him pedialyte with Karo syrup in it for 3 days and that didnt help so he prescribed a stool softener, lactulose, to take 3 times a day for 2 weeks. I have given it to him for 2 days and he still hasn't pooped. I've also stopped giving him solids and he's breastfed. It's been 10 days total since his last bowl movement and I'm getting very worried. How long can a baby go for without a bowel movement and it be okay? Hes not acting like hes in any pain. Hes still very happy most of the time. A little more irritable and clingy, but that could just be the stage hes in. It may or may not be related. But I don't know what to do. I'm so worried something more is going on here and his doctor is not takin it seriously.

UPDATE: He pooped one time each day the 3rd and 4th days I gave him the prescribed stool softener and then stopped again. It has now been 3 days since he pooped last and once again, nothing is helping. He farts a lot and it smells like an adult fart. But now he is also acting like hes in pain when hes trying to poop. Hell push so hard his face turns bright red and he cries out. It happens a few times a day but nothing has come out in 3 days. I feel so bad and I don't know what to do.