I used the following command to summon a pig with an instant health effect:
/summon Pig ~1 ~ ~ {ActiveEffects:[{Id:6,Amplifier:1,Duration:3217,Ambient:1}]}
It became clear that the pig could not be slain by any means. The same effect was true with all amplifier levels.
The pig is not invunerable, but it's getting added 2 hearts of health every game tick for 3217 ticks.
That's the reason why the instant potions shouldn't / must not have a duration > 1
Span the pig with