(TLDR at the bottom)
It does depend on the location afaik, but in the locations where it's happening what's happening is that it's probably trying to dress you in the default outfit of a clothing category (Categories are selectable in the Top Row of the wardrobe menu) where you have nothing selected (most likely formal, or at least that's what I think it's called, it's the one with the wine glass as the icon) which is why it works with tattered clothes, since they become the default outfit of the category.
In most parts of the game it just picks another outfit, if there are no clothes selected, but sometimes it doesn't, such as in your case.
It's probably just an oversight, but for now, the best thing you can do is just have clothes selected for every category, to prevent it from happening.
Sorry for the relatively long text about it, but I hope I could be of help
TLDR: Select clothes for every category in the wardrobe, which are the icons on the top row of the menu, this should fix the issue afaik