Baby suddenly pooping overnight

Just started trying to sleep train baby, but with occasional check ins. Well at 3 am she would be crying and I would go in there—only to smell that she pooped. She usually never poops at night just pee. Now it’s been like a week later and it’s been happening like 90% of the time.

anyone else deal with this? How do I get her to not poop at night? I’m worried it’s been irritating her since before her waking up. And now I’m overthinking that when she’s crying that she might be irritated from a poopy diaper.

Is this a phase during sleep training?