Tested with an infinite regeneration, amplified to 255. Although it showed up on the gui, and within the inventory screen, when damaged, it did not actually trigger.
This can be achieved by reloading into the world with an active potion effect when logging out.
Here is a stremable of the bug: https://streamable.com/e1vfk
Thank you for your report, but it is a duplicate of MC-118857.