Bonuses from food and potions disappears

I think what you are actually talking about here is the health/stamina bug.

If you acquire a buff that increases your max health/stamina, then eat/drink to full, which grants you a +5% bonus to max health/stamina, it will overwrite your previous buff.

When the timer on your buff runs out, you will lose the bonus that you already lost, and your health/stamina will go negative.

Because of this, it is generally recommended that you avoid +health/stamina buffs. Only buffs are bugged, bonuses from gear are not.

This is a very old bug (1,2,3,4,5) that has probably always been in the game, but went unnoticed by most players prior to the 3.0 update due to the fact that bonus health/stamina buffs were exceptionally rare before then, with most buffs being +attributes instead.