This may or may not be a bug, effects don't persist between world sessions.
Open a world with cheats and give yourself an effect.
Close and reopen the same world whilst having the effect and the effect may or may not still be in action despite displaying that you have it.
Attachments
Comments 4
Is this still an issue in the most recent versions (currently that is 1.15, or the latest pre-release 1.15.1-pre1) of Minecraft? If so, please update the affected versions and help us keeping this ticket updated from time to time. If you are the owner/reporter of this ticket, you can modify the affected version(s) yourself.
I'm sorry, I haven't had the chance to update this in a long while. I'll check if this bug persists as soon as possible.
The glitch works with haste and regeneration.