Potty training

So we’ve been working on potty training our three year old . If we’re in the house playing I usually let her go with nothing on with her potty in the living room and she knows to go on it when she has to go but if I put underwear or anything on her she goes in her underwear. I don’t know how to get her to stop doing that . I don’t get why she’s doing it either if she knows she can use her potty . Anyone have any tips