Yeah, makes sense. I've encountered this before with CheatEnginehey, you just found a game which stores "displayed objects on screen" and "read data" differently.
The game is probably keeping two different counters : one for health which decrease when you get hit, and one for the number of element to display on the screen which serves as health bar.
imagine, link has 5 hearts.
the game checks the health point (5) and tell the video function to draw 5 heats on the screen.
You fixed the 5 to stay at 5.
You get hit and now have 1 HP:
the game checks the health points (1) and tell the video function to draw 5 hearts on the screen. (you see the issue right?)
your real HP is not 5, but 1.
Still can't get a working code for infinite health though- the closest I get is LOTS of health (more than shown in heart values), but this in turn decreases as well.