I've looked at the game's code. It depends on the choices you make during the story line. There is a variable called sympathy that starts at 0. Some choices increase sympathy and some decrease it. If you have at least 1 sympathy, she will choose to stay with you.
Choices that increase sympathy:
- You don't have to be so formal.
- I'm glad you like it. (after giving her the normal dress)
Choices that decrease sympathy:
- *Push her head down*
- It's proper apparel for a whore like you.
- I guess even you're good for something.
- *Find a stray dog*
There are only 2 chances to increase sympathy and one of them is locked to the normal dress path. So in order to have her stay with you when giving her the lewd dress, you must choose the "You don't have to be so formal" option when you first meet her and NOT choose any of the options that decrease sympathy. You can also just edit the save file to increase sympathy.