Ok, I didn't see this posted before so I'm posting this, please don't flame me if it's a repost. ><
To explain what the Vanish bug is, it's when you cast Vanish and immediately pop out of stealth, even without DoT debuffs on you. It's been around forever and doesn't appear to be a priority to be fixed anytime soon.
Here's how you get around it, and although not 100% of the time, the chance for Vanish to bug out one me has dropped considerably, and it makes quite a noticeable difference.
#show Vanish
/stopattack
/cast vanish
Basically, Vanish bugs out for two reasons.
1.) When an attack lands on you after you vanish (due you server/client lag)
2.) When you land an attack on an enemy immediately after you vanish (due to the same lag)
This macro will theoretically prevent the Vanish bug from happening ~50% as often as it does for you now.