E.S.
I have have seen some kids do the same thing when I helped in a daycare. Some kids won't poop in a potty only in their diaper. It sounds like she does fine with the panties except when she has a bm so keep her in the panties and ditch the pull-ups. I have seen that this works with some kids, when they have a bm in her panties or pull-up take her with you and dump it into her potty chair, this way she sees that her bm should go in the potty.
Another idea is, if you notice she always does a bm in a certain spot of the house, (say she always goes to a certain corner of the house to fill her diaper) maybe you could try to put her potty in that spot, sometimes that works.