Persistent consequences for failure, most commonly losing items you had before the try, are a concept present in a lot of games with a reputation for being "hardcore", like Dark Souls. I'm disappointed that more people don't rail against it, so I'll list several downsides and debunk all alleged benefits of the practice that are brought to my attention.
Even if the player doesn't have an artificial reaction to it from a preconceived belief that it's unfair (which I admit I have), there are massive emotional downsides: the player will not only be more upset on failure but they're very likely to regret trying. "Why did I decide to play this game when I was distracted?" et cetera (leading to not wanting to play the game except when they feel they're at their very best). If they were having a bad day and sat down to play their favorite game, they'll come away far more upset because the one thing in the day that was supposed to be a happy time literally made things worse. Perhaps worst of all, if someone else in real life is in some way responsible for them losing (such as disturbing them during them an attempt), you can cause interpersonal drama.
In a well-designed game, every time you fail at a hard section you can at least think "Well I got some practice. It wasn't a waste" (Dark Souls is actually a very good demonstration of this effect whenever the persistent cosnequences don't apply; Jedi: Fallen Order is a purer example). But that's not true of games that punish you for failure. It's very often the case that you'll have truly moved yourself farther away from being able to beat it.
Persistent punishment for failure disincentivizes players to experiment. If they're leaning on a bad strategy as a crutch that only works for the early levels, they're not going to want to try to learn to play better because you'll punish them for doing so. I experienced this with parrying in Dark Souls; it's incredibly powerful but it takes a lot of practice, and during the practice period you'll fare much worse than if you didn't try to parry.
If the player fails several times, one of the following things will necessarily happen:
Your game only does this up to a certain point, at which point all alleged benefits of the practice are nullified.
Your game allows some sort of grinding or any way to undo the persistent consequences by repeating some disinteresting task (Dark Souls does), and the player just resorts to that. Any alleged benefit is lost as it all boils down to wasting the player's time.
If you don't do either of the above things, the challenge can become effectively impossible and the player is forced to drop the game.
As of now, the only defense of the practice I'm aware of is "consequences are necessary to raise the stakes; games aren't as engaging when there are no consequences for failure". This defense, like the similar defense of RNG, thoroughly misconstrues how fun works.
Being afraid of being punished is not fun; being excited to win is. But that excitement scales with the magnitude of the enjoyment of winning, which of course is based on the degree of challenge you overcome. In other words, the real way to make a fight more exciting is not to make it longer or impose consequences for failure but to make it harder. The fear of loss on the other hand scales not with the magnitude of the challenge but with how much you stand to lose. So punishing players for loss actually raises the fear of losing without raising the excitement of winning.