Chronic constipation in 5 year old

RA

Hello!! I am looking for some suggestions as I am not sure what else to do. We have made appointments and they suggest a full cap of miralax we did that for two days and she had the worst diarrhea I’ve ever seen to where clothes had to be thrown out, I stop giving it to her because it was so bad and she was in tears because her stomach hurt. Now yesterday she did amazing and today she’s back to the accidents and saying her belly hurts. Should I restart the miralax or call her dr or does anyone who’s been through this have any suggestions.

For anyone that is going to say “well why didn’t u keep her on the miralax.” I stopped it because I was throwing away 10 outfits between the two days and I can’t afford that. I threw them away because they were non salvageable .