Is there anything else I need to set?
Answer to this is:
Setting those flags in the base definition does not auto-update the follower in the game world.
Also, there is scripting in place by default which manipulates Dogmeat's essential tagging in the game world after you meet it.
I'd forget about the invulnerable flag if I were you. If you're simply trying to make dogmeat be essential, edit the hire quest and on-hire, put a setessential statement for dogmeat into the result script that hires him.