The bug
The player's reach distance for entities is shorter than the reach distance for blocks. This can be seen when trying to attack silverfish from two blocks above. The blocks below them can be reached, however in order to reach the silverfish, the player needs to sneak.
This issue does not happen in Creative mode.
Related issues
relates to
Attachments
Comments


Works as intended, see this comment by @unknown.
Edit: Didn't see that Mojang considered fixing this judging by that they didn't resolve this as WAI, which contradicts the comment I linked. In that case, MC-92484 should be reopened and be linked as relating to this bug. Maybe this report should clarify in the title that mob entities are affected while MC-92484 is about placeable non-mob entities like item frames.
Can confirm in 20w51a.
Can confirm in 21w03a.

The code responsible for truncating entity reach to 3.0 is in GameRenderer#pick(), where the check if (flag && d2 > 9.0D) discards the entity pick result if the entity is further than 3 blocks away. This is despite the fact that the actual entity pick (via ProjectileUtil.getEntityHitResult) is done with a distance equal to the pick range, which is higher than 3.0.
Even if this line is fixed, there will be other issues with large entities, since the serverside validation checks perform bottom center-to-center distance checks, instead of eye-to-closest-corner. But for the scope of vanilla, bottom center-to-center works, since there are no large entities.

In Minecraft 23w51b, we can see that the value of "entity_interaction_range
" is 3.0, unlike the value of "block_interaction_range
", which is 4.5.

This is a feature request. The attack reach is intentionally made higher in creative mode. Attack reach and block reach are not supposed to match, the default attack reach has always been 3 blocks.