1. Try to do "/summon minecraft:phanton ~ ~ ~ {NoAI:1,Invulnerable:1}", keeping the capitals on the NBT tags because otherwise they wouldn't work correctly.
2. A phantom should be spawned at the exact same position that the player.
3. If you move to the sides, the phantom will be moved from the point it was spawned unlike any other known mob summoned without AI.
ProTip: It happens too if the player is on Survival.
This is considered intentional/won't be fixed per Searge's comment on several other issues: