If the Warden targets a mob with the invulnerable tag (Invulnerable:1b) it will not attack the mob. Once it gets angry enough, it will continually roar at the mob instead until the mob dies some other way.
/summon minecraft:zombie ~ ~ ~ {Invulnerable:1b}
/summon minecraft:warden
Comments 2
The core issue here is MC-249531.
I think that the warden should just ignore invulnerable mobs altogether.