Disclaimer: This is my first bug report.
You cannot sit or stand invulnerable wolves.
How to Recreate Glitch #1:
/summon minecraft:wolf ~ ~ ~ {Invulnerable:1}
Tame it or add Owner tag to summon command
Try to sit it
How to Recreate Glitch #2:
Spawn a wolf and tame it then go near it and run this command
/data merge @e[type=wolf,sort=nearest,limit=1] {Invulnerable:1}
Try to sit it
Cannot reproduce. Also the '/data merge' command you provided is incomplete/invalid.