1. Summon a zombie with the CanPickUpLoot tag.
2. Give the zombie a sword with the Curse of Vanishing on it.
3. Kill the zombie and pick up the sword again. It still has the curse on it. This will be the case 100% of the time.
However, if you summon a Zombie with a vanishing sword already in its hand, then that sword will not drop about ~95% of the time. The other ~5% of the time the sword does drop with decreased durability, which means that it's a 'lucky drop'. You can try that with this command: