The bug
Withers and wither skeletons will be killed by the wither damage of the /damage command, even if they are immune to wither damage.
Reproduce steps
Summon a wither or wither skeleton.
Use the /damage command:
Wither
/damage @e[type=wither,limit=1] 500 minecraft:wither at 88 65 1
Wither skeleton
/damage @e[type=wither_skeleton,limit=1] 500 minecraft:wither at 88 65 1
Found them all withered away.
Expected to happen...
Using the /damage with wither type should not damage withering-immune mobs.
Can confirm