I don't know if this counts as "towns" and this probably isn't exactly what you're looking for but if I recall, that town in Persona 4 is also a main setting so I'm gonna roll with this. The following are settings for games that take on a life of their own. I have never played any open world action game or RPG or anything that put so much detail and atmosphere into self contained places like these:
Butcher Bay - The Chronicles of Riddick: Escape From Butcher Bay
The entire max security prison has an aura of despair and violence but to narrow it down, the original section at the beginning in general population oozes with atmosphere. You can fully walk around your prison ward and take on side missions, talk to the prisoners, go into cells, fight with people. Screams from behind closed doors. Moisture on the walls and limited light except in the courtyard. Amazing to play.
Arkham Asylum - Batman: Arkham Asylum
Most people have played the original (and best) in the Arkham series. I saw this is the best game because it, again, is a self contained title. You get to uncover, the rediscover new places to proceed through the asylum. It almost feels like the video game version of Die Hard where you spend a whole day in Arkham stopping the Joker, but you never leave. Even once the game is over, energy still emits as you uncover backstory for (Amadeus?) Arkham as well as solve Riddler puzzles. None of the sequels had the atmosphere that Asylum had.
Rapture - Bioshock
You feel the horror stuck inside your pod as you arrive in Rapture. The place is dark with light only funneling in from the ocean. Deformed people screech, you walk through puddles that litter beautiful carpets and walls with an art direction akin to 1920s Atlantic City or something. So much beauty but so much decay and madness. This is the most atmospheric game setting of all time if you ask me. I'll never forget Rapture.
Sevestapol - Alien Isolation
This is the next best thing after Rapture. This space station begins to feel so familiar by the end of the game, but that in itself doesn't mean the terror of the foggy and dim corridors is null. The sounds of doors opening, or the glow from old CRT computers all help the station take on a life of its own. The abandonment from the staff and the survivors slowly being killed by the alien makes each return to a prior hallway much more eerie.
Like I said, you probably weren't looking for this answer but akin to what you posed, "towns that are more than just window dressing," I'd say that these are nothing of the sort. Are they towns, no, but they aren't like some games where you battle in a generic jungle or an RPG game where you are exploring a borderline empty sprawl with nothing except some loot sprinkled in between. These settings are the richest I've personally played.