/clear @s *[enchantments~[{enchantment:"minecraft:vanishing_curse"}]]
removes all items enchanted with curse of vanishing in 1.20.6. It instead matches with every enchanted item in 24w20a
Steps to reproduce:
Give yourself a sword with only sharpness 1
Run the command
See it disappear despite not having curse of vanishing
Try again in 1.20.6 to see it working well
Not a bug. The format for enchantment sub-predicates changed in 24w18a; the
enchantment
field is now calledenchantment{*}s{*}
, plural.