I would have replied to this 6.5 year old thread about the exact same issue, but it is locked: RaycastCommand gives incorrect results when direction isn't normalized
Basically, there is no indication that RaycastCommand should need a normalized direction vector, as Physics.Raycast does not require one. This very important behavioural difference should be given a line in the docs. Here is my reply:
I spent two hours debugging the same issue, until I found that the raycasts which were nonsensically failing to hit things, worked perfectly with Physics.Raycast(). Then I figured out it was because the direction vector was not normalized. Whilst I did suspect it may need a normalized vector, I’m also using Unity.Physics which expects startPos and endPos, so it was cheaper to store the direction vector with the distance baked in because I run these raycasts in both Physics engines. Non-normalized direction vectors are supported by Physics.Raycast(). When I was designing the system, I checked the docs for RaycastCommand just to make sure, and there was no mention of a normalization requirement for RaycastCommand and I didn’t see anything in the limited source (as with other areas, actual source code access would be very helpful).
It has been a while since this was suggested (~6.5 years) but I think the docs need updating to state the normalization requirement, which would hopefully help people to stop wasting time debugging this issue. The linked thread already contains suggestions on how to do that.
For example: RaycastCommand gives incorrect results when direction isn't normalized
It would be great if someone from Unity could make this more clear in the docs. Thanks for reading!