This bug also applies to other entities (e.g. armor stands). I find for entities with a thicker hitbox, it works better to shoot the arrow slightly offset from the hitbox instead of directly at it.
I suspect the bug is due to the original arrow being deleted, then a new arrow spawned slightly ahead so the velocity is preserved.
Can confirm for 1.18.2 and 1.19/1.19.1/1.19.2
This bug also applies to other entities (e.g. armor stands). I find for entities with a thicker hitbox, it works better to shoot the arrow slightly offset from the hitbox instead of directly at it.
I suspect the bug is due to the original arrow being deleted, then a new arrow spawned slightly ahead so the velocity is preserved.