Ok so there are a ton of anti-cheat features in the game even in offline mode. Very frustrating. In my hero editor feature I disable a few so it doesn't set you hit points to zero (which it did sometimes). But EVERYTHING regarding the heroes has multiple anticheat checks that I couldn't get rid of. I found the cool downs for the skills/abilities but too much anticheat stuff. Anyway here is the deal at the VERY beginning of a chapter or when a hero first arrives you can set their min/max health and it sticks. Once they start getting injured the anti cheat constantly checks current health (but not max health). So set both when you first see the hero (you can set it to like 100,000 if you want) and FREEZE. Ok so here is ANOTHER thing: When you level up it may reset your hit points. Freezing the CURRENT hit points while they are healing does no good.
So what I did once was use your XP script and NOT let the hero get hit but allow to level up then used my editor to change the min/max hitpoints and it worked (sometimes). Also sometimes you can do it during a cutscene and the game seems to miss it.
To be the SAFEST in keeping your current hitpoints super high after you change them use the "Disable level up" script I have included. Then set your level/level up points manually using the hero editor. Sure you won't do as high a damage (cause yes the anti-cheat feature checks that also) BUT the game won't reset your hitpoints back to normal either and all your heroes can have 100,000 or even you can set to 500,000 hitpoints. Or you can try your XP script, keeping your heroes from getting hit, level up immediately change your min/max hp or still have it FROZEN (which I suggest) and then select the disable level up script (JUST in case!) and try it that way.