Taking a single HP worth of damage with absorption hearts + 1 health as max causes the heart to disappear
When typing inĀ
/attribute @s minecraft:generic.max_health base set 1
so that your max health to 1, and eat a golden apple to get the absorption hearts, taking 1 damage(From fire, cactus etc) will make your red heart disappear instead of the golden absorption ones. Taking multiple damage does not cause this, (Ex.falling from 4+ blocks or getting damage by cactus 2 times. This causes the red heart to disappear and reappear)