I am a mother of five children, two boys and three girls. My oldest and third one are boys and they were both potty-trained, both day and night, by 2 and a half years of age. My second oldest is a girl and she potty trained herself when she was 13 months old. My three older ones did exact same thing as your daughter: they went to the bathroom fine if they did not have anything on. But once they had pull-ups, dipaers, underwears, pants, you name it, then they just wet themselves, instead of using the potty.
I let them run around without underwear at home for a little while. Then eventually, I finally had to put them in training underwear. They are made with a little thicker material than the regular underwear. And go ahead and expected accidents, many, many accidents. Eventually, my kids decided to use potty even when they had something on.
My forth one was a little different than the older three. She did not want to be potty-trained until she turned 3. But once she decided she was ready, she was potty trained in one day. No accidents even at night. She has probably had the least accidents out of the 4.
My fifth one just turned 2 in March and she also uses the potty if she does not have anything on (Like my three older ones, she refuses to wear underwear and so on.) With her, I am going to wait until the summer to really start potty-training. At first I am going to have to have her wear underwear. If she wet herself a few times, I know she will get it eventually.
Good-luck with your daugher! It takes a lot of patience.