My daughter went through this. She did her poops in the nappy for a bit. Then we did a sticker chart for her to do it in the toilet and she got over it.
I would try taking her into the bathroom and telling her you will be outside the door when she needs help. Both my girls required privacy and would not poop with me in the room! They proudly call for me when they are done and we celebrated. I was trying for a long time to “hover” and it was backfiring and was stalling us with potty training. Once I started giving them space…both would poop independently.
My daughter is 18 months & hates 💩 The doctors prescribed lactolouse to help because she just won’t push it out it comes out as overflow and the odd big solid. Hopefully she grows out of it soon
How old is your daughter? What potty training methods were you using? I'd try to focus on giving lots of great foods to help avoid constipation and make it easier for her to go without straining.