If you're talking about Electrostatic Discharge (the one that damages you for moving), that's just how it works. If you have sutra or other invincibility when they actually use the skill, it resists it, but using the invincibility after it's already on you doesn't work, and still hurts you.
Devouring Darkness is also a skill that has a duration effect, meaning if you resist the first hit, you're fine, but if not, you get paralyzed for 1 sec 3 times over 9 seconds ignoring invuln. Those skills are treated as debuffs, not attacks. The same way you can sutra after a Tangling Mire and still have the effect on you.