I actually don't like it when the game full heals you when you level up, for a few reasons.
1) It breaks any balance if your game is based on attrition. If you want the player to have to juggle resources in a dungeon that goes out the window when they can get a full heal and full MP returned by leveling up on mooks. Imagine Persona 5 if you full healed and got all your SP back every level up. It would defeat all of the resource management portion of the game completely.
2) In games where you get EXP in battle, you can use cheap tricks to bail yourself out. I once played a tactical game where I actually attacked my own party member just to get the small EXP I got from it, as that was enough to level me up and fully heal me.
You're definitely not wrong that full heals for Level Up can be problematic design-wise, but allow me to play Devil's Advocate and present why it's not usually that bad (and might even be worth the feel-good effect that comes from using the feature):
"It breaks any balance if your game is based on attrition." - I think this is the strongest argument against full heals, but in the same breath, it also provides a rare out for the player that feels like a "miracle" if the player wasn't closely watching EXP (and they often don't). It's sort of the equivalent of when heroes you really like are completely cornered, nearly beaten, and then something comes to save them... except in this case, it doesn't feel like total BS, because it's an actual, consistent mechanic o the game that came to save them!
"Imagine Persona 5 if you full healed and got all your SP back every level up." - This full-heal mechanic also isn't as gamebreaking as you claim (unless Level-Ups are happening super-frequently), because it's one character at a time that Levels Up, not the whole party. If I were in really bad shape in P5, and Ryuji happened to level up and got a full HP/SP heal... I dunno, I feel like maybe it would be enough to get me back to a Save Room, but wouldn't totally scuttle the exhaustion-based progression of the dungeon crawling.
"In games where you get EXP within battle, you can use cheap tricks to bail yourself out." - This is true if you can get EXP within battle for
repeatable actions besides KO'ing enemies (and the Level-Up can occur within battle). Through a lot of experience as a player and designer, I've personally found that this kind of EXP Gain always represents bad design because it misaligns the player's actual goals with the intended goal of combat. (This is kind of a shame, because the idea of getting experience for the
things you do as you fight always sounds like a cool idea.) Therefore, the only type of EXP gain within combat that would represent good design would be getting EXP as you KO each individual enemy, and while that might completely shove the battle in your favor if a badly hurt character Levels Up, I think that falls under the "enjoyable miracle" umbrella more than it falls under the "cheap trick" one (because you're doing what you're supposed to do).
So from a more broad viewpoint, I think that the full heal is a nice touch that's always welcome in games where the challenge tends to be acute (easy to restore resources, but each combat has a chance to kill you), and a risky but sometimes welcome design choice where the challenge tends to be chronic (no one normal encounter should hand you a game over if you came in fully rested, but each one will wear you down and eventually you'll run out of resources if you don't play well).