How to reproduce:
Set time to night
Turn an enderman hostile
Stand still (don't even look at it's face since that causes it to teleport)
What happens:
The enderman will only hit you only once, and since you're standing still it doesn't hit you again, and just stands next to you.
Or 2. The Enderman hits very slowly ranging from about every 5 seconds to every 15 seconds, it also suddenly moves back and forth when it's going to do that.
Look at the video attachment for best explanation
Related issues
is duplicated by
relates to
Attachments
Comments

Can confirm with a video
[media].
(Note that I have applied a resistance effect to the player for the test.)
The issue is twofold:
The enderman will start shaking and hitting will happen less frequently than it should.
After some time, the enderman will loose interest and randomly starts teleporting away even if you continue hitting him, but he will forever ignore you.
If you start walking, the enderman will hit you more frequently as expected.
Can confirm for 1.14-pre5.

Can confirm for 1.14-pre5.
Can confirm for 1.14.
Can confirm for 1.14.1-pre2.
Observing their head movement, it seems endermen will regulary switch interest between their target and "something else" if the target is still. It can also sometimes be noticeable with other hostile mobs but not as much as with endermen.

Related to MC-159299

@Orbic Oh, you're probably right. We just have different explanations for it.
I couldn't find this bug on the tracker when I reported them. (I also made MC-159299)

It's about time we see this fixed smh

In 20w18a

Fixed in 20w21a
Likely fixed with MC-147516