I have set it to condition pressing of ZL. I like it that way but if you prefer you can remove the condition key (the first and last line, I don't know if there is risk of crash, I just by default set condition key). I already told you the game will set it to the max of the character.
A possible explanation to you observation is you press ZL so the HP is 500, you drop so the game subtract the damage amount and when it refresh the value for display it set it to the max of your character. After that you didn't press ZL so the HP is at 60 and when you drop again your HP is of course no longer 60.
When you remove the condition key HP will always seen as the max but didn't you say you suffer crash with other code? Try it and if you do suffer crash then revert back to my version.
This game is rather slow moving for me and hardly that many combat. There is a P1 HP code already posted, I tested it and it works fine. You can use my code on the other character then you have both with inf HP in combat. If I play more of this game I may make more code.
I will try removing the zL key press tomorrow but my HP never says 500.
I appreciate your replies. This is the only game that has given me a headache with cheat codes for some reason.