on hit block enchantment @s location

when using function on hit block effect the @s location is sometime at the tail of the trident and some other time at the head. How do i guarantee @s is at the head, or maybe its just lag
Continue to help post