I stand to be corrected, but isn't it right there in the 5e DMG somewhere, that DMs can fudge if they need to?
In 5e 2014 DMG235
If you roll dice where the players can see, they know you're playing impartially and not fudging rolls. Rolling behind a screen keeps the players guessing about the strength of their opposition. When a monster hits all the time, is it of a much higher level than the characters, or are you rolling high numbers?
Rolling behind a screen lets you fudge the results if you want to. If two critical hits in a row would kill a character, you could change the second critical hit into a normal hit, or even a miss. Don't distort die rolls too often, though, and don't let on that you're doing it. Otherwise, your players might think they don't face any real risks-or worse, that you're playing favorites.
In 5e 2024 that changes to
Should you hide your die rolls behind a DM screen, or should you roll your dice in the open for all the players to see? Choose either approach, and be consistent. Each approach has benefits:
Hidden Die Rolls. Hiding your die rolls keeps them mysterious and allows you to alter results if you want to. For example, you could ignore a Critical Hit to save a character’s life. Don’t alter die rolls too often, though, and never let the players know when you fudge a die roll.
Visible Die Rolls. Rolling dice in the open demonstrates impartiality—you’re not fudging rolls to the characters’ benefit or detriment.
Even if you usually roll behind a screen, it can be fun to make an especially dramatic roll where everyone can see it.