When you place water at an Enderman's feet (actual water bucket) and hurt them, they will simply let you do it or teleport away, not trying to kill you.
Recreation;
1. Spawn an Enderman
2. Get a water bucket
3. Place the water on the Enderman
4. Enderman will not proceed to kill you, despite you are hurting it.
Pictures show me placing water and the Enderman not attempting to kill me