Minecraft wiki entry for Effect, associated text: When drinking from Milk Bucket, dying, being saved from death by a Totem of Undying, or traveling through the return portal in The End, all status effects are removed. Single-player users with cheats enabled and operators in multiplayer servers can use /effect clear <playername>‌[Java Edition only] or /effect <playername> clear‌[Bedrock Edition only] to achieve the same goal.