The bug
Whenever any entity hits a phantom, the phantom will not attack them. Players are the phantom's only target.
Linked issues
relates to 2
Comments 5
Yes, this works as intended. Phantoms have no reason to go after different mobs, and they only come out when you (the player) doesn't sleep.
That's not a bug. Phantoms are attracted to insomnia.