Projectiles always hit their target a little too far. In fact, you could use a shield and see how far it hitted which it shouldn't.
Steps to reproduce:
Option A:
1. Spawn a skeleton with a bow or trident drowned
2. Get a shield
3. Get them to shoot you
Option B:
Get a trident
Throw and hit something with it
Observation: The projectiles hit a little too far from their target entity. They seem to stop or disappear at around 1 block from the actual hitbox of the entity. This is more noticable with the trident as it stops way too far from the entity it hits, same with shield blocking arrow as it stops 1 block from the player's hitbox.
Expectation: The projectile is suppose to only disappear or stop when hitting the target's actual hitbox
Well that explains why when you shoot relatively close to a target the projectile is not visible.