Struggling to Poop for hours

Does anyone else's little one struggle to poop for hours? My baby struggles for hours to poop. He strains and he cries sometimes. He passes gas but doesn't go until hours later. Then it just blows out. Is this normal? I hate seeing him strain and whimper for so long. He is exclusively breastfed btw. He has multiple bowel movements a day (at least 3-4) so the straining is happening all day long. It's even affecting his sleep. :(

Pediatrician prescribed reflux medicine and said it was normal. I don't believe he needs the reflux Medicine since he doesn't spit up often so I'm not sure why he prescribed it. I think this doc just wanted to put a name on what LO is going through so he just said reflux.

Please help.