Leaving is the least toxic thing you could do.
Alternatively there is combat locking people in a boss encounter with a crafty alt-f4, kicking people from the party right before you kill the boss (if you play the long game), and my favourite: just pretending to DC.
That last one is so aggravating because DCs happen, and I will wait for you. Not knowing if you’re being a waste of skin or you genuinely had a net hiccup is probably the biggest contributor to me hissing and screaming at the word “pug”.