If the player has an ambient level 2 effect (possible in survival via the beacon) and gets inflicted with a level 1 effect of the same type that isn't ambient, the level 2 effect will no longer be ambient.
To reproduce:
Create a beacon that gives a level 2 effect
drink the level 1 potion
the level 2 effect will no longer be ambient (until the beacon reapplies the effect
Alternative method:
run
/give @p potion[potion_contents=\{custom_effects:[{id:"minecraft:speed",amplifier:1,duration:1200,ambient:1b}]}] 1
to give yourself a potion that inflicts ambient speed II
drink the potion
drink a regular potion of swiftness
the speed II effect will no longer be ambient
Linked issues
Comments 3
Yes, this describes a specific case of MC-189162 that is the most common in survival gameplay.
Would MC-189162 describe your issue?