If the player starts to eat a golden apple with gamerule keepInventory true and is killed while eating, after respawning the player will have the absorption hearts in the bar, however this is only visual. It will not dissapear even if you die, the only way of making it go away is to eat another golden apple.
Environment
OS: Windows 10 Pro (build 17763.475)
Java: 1.8.0_51 64bit
Does MC-108707 describe your issue?