When the command
/effect give @s minecraft:regeneration 4 0 true
is executed on the player every 20 ticks, health never increases.
I believe this is due to the regeneration timer cycle and level. Since the effect is being applied every second and the time it takes to heal a half heart is 2.5 seconds, the effect never lasts long enough even though the effect is never removed, only refreshed. With regeneration 2 however with a 1.25 second half heart regeneration time, a heart is regenerated every second because of the timing between giving the player the effect instead of 1.25 seconds with a long duration effect command.
Duplicate of MC-62103.