Zombies are unable to attack Players since they're too short, about less 'an two blocks, while Endermen are about three, whose height should be able to reach the Player's one who is on a Camel when they both are on the same parallel ground, even though sometimes they have rate to hurt the Player.
PS: Datapack on.
Related issues
relates to
Attachments
Comments


This may also happens to Warden but yet I didn't verify it.
Ravager and Iron Golem is OK.
It's important to note that this issue is present most of the time. Occasionally, endermen will be able to attack you whilst you're riding camels. I've attached a video demonstrating this behavior.
[media]Fixed in 23w33a.