I have issues with that.
First, while I'm not about punishing players for "making mistakes" or overly penalizing people, if the response to death is a new character of the exact same level and gear just spawns it sure trivializes death.
"My character died? Cool! Now I can try that new warlock/paladin build without the awkwardness of low levels."
Doubly so if the replacement character is a carbon copy.
Second, it's silly in a dungeon. Why is there suddenly a person in the dungeon that hadn't been opened in centuries?
And it's always weird when the player characters meet a random person and suddenly trust them with their lives. They're super suspicious of everyone they meet ever, but rando the fighter in the dungeon is cool.
Yeah, I want to bring that player back in as soon as possible… but it needs to make some sense.
Third, what about resurrection?
If the players are going to cast raise dead that player is at the mercy of the players having the gold and stopping for a rest. The rest of the table should be required to stop adventuring and having fun to go back to town, put the story on brakes, to bring on PC back.
That's excluding situations where the character isn't dead, but isn't contributing. Like the result of being feebleminded or petrified or polymorphed into a newt.