The bug
Phantoms still spawn and exist in peaceful mode. The phantoms will also still fly at the player and make their attack sounds. While they do fly at the player and make the sounds, they do not deal damage if you are playing on peaceful difficulty.
Linked issues
is duplicated by
relates to
Attachments
Comments

This is an intended feature I think.

I'd really want to see that from a Dev. Even if it doesn't deal damage, they are still aggressive creatures displaying aggressive behavior, and that is not how it works for any other such mob in Peaceful.

I still get this on bedrock
This issue relates to MC-91436.