Arrows behave weird when are enclosed on a rail. Their particles start displaying incorrectly, glitch out and even appear 6 blocks away from the arrow.
I play on 1.19.30, but think that this bug works on versions higher too.
How to reproduce:
Place a rail
On 3 sides of the rail place solid blocks
2 blocks higher than the rail place a dispenser facing downwards
Put any tipped arrow in.
Actvate the dispenser. If the arrow does not fall on a rail, repeat.
Note: this may take some attempts to reproduce.
Can not reproduce this in latest release