UTY trivia #98: Jesus Christ
So: almost every time you enter any battle, your stats at the beginning of that fight get saved in a backup file. If you die in that battle and retry, it'll put you at the beginning of that battle with the same stats you had at the beginning: the stats it just saved. The only exception to this is Decibat, whose fight just does not back up those stats. This is almost definitely an oversight—the script used to start Decibat's battle is different than most other battles, the devs probably just forgot to include the saving bit in Decibat's unique script.
This means that if you press retry on Decibat's game over screen, you start back in Decibat's fight with the stats you had at the beginning of your last encounter. This is only for the "retry" button. The "continue" button uses your normal save, not your battle backup, so it works fine.
In the video, I showcase how retrying on Decibat interacts with HP. Casual players are pretty likely to run into this—Rorrim's mandatory encounter is right before a SAVE so they'll probably have lower HP when they run into him, and then they fight Decibat right after. (I mean, I thought Decibat was pretty hard... I died a couple times my first run...) If they encountered Rorrim while beat up and then died on Decibat, they'd retry with less HP than they started with. If you encounter any enemy while beat up and then retry on Decibat, you can see this yourself.
However, this affects more than HP. If you killed the last monster before Decibat, and then you die to Decibat, you lose that EXP—if your LV increased in that battle, your LV will go back down as well. So, level up from 2 to 3 in the encounter right before Decibat, then die and retry against Decibat, and you're LV 2 again. If you change your gear after that last encounter, you'll have the gear from before that last encounter equipped after you retry. If you did anything in that last encounter besides flee, dying to Decibat loses you whatever G you got in that last encounter. Decibat robs you.
[Video description: A recording of the Undertale Yellow Dark Ruins. It is sped up at mundane points. Text in the top right reads "1. get hurt in an encounter." Clover encounters a Rorrim, gets damaged once to 16/20 HP, and then flees. The text changes to read "2. enter another encounter." Clover runs until they encounter another Rorrim, and then they flee right away. The text changes to "3. make your HP different (by saving)." Clover saves, then checks their menu, showing 20/20 HP. The text changes to "4. die to decibat." Clover enters the Decibat battle and intentionally dies. The text changes to "5. respawn," they press retry, and they start the Decibat battle with 16/20 HP. More text appears to point at the HP with an arrow and question marks. End description.]