We’re going though the exact same thing. I tried to take away nappies completely and he ended up getting constipated. Currently we put a nappy on him in the morning and in the evening so he can poop, and then he wears underwear the rest of the time. I honestly don’t even know what the solution is, but you’re not alone.
My son had a ton of trouble pooping in the potty and would just hold it as long as he possibly could. Our pediatrician recommended letting him use a diaper to stop the withholding, but he didn’t want to poop in a diaper either. Eventually we had to use miralax and tons of high fiber foods so that he couldn’t hold it anymore and just had to go. It was a super stressful time though- I don’t recommend it! If you aren’t in a rush to potty train for day are or things like that I’d maybe give her more time- because when they withhold it’s so stressful!!
We did. She didn’t like it at first but we just stuck with it. Now she goes without issue.