Are the two pictures only for illustration? Because the camera views are very different so its not much of a surprise that the ray is visible on one and not the other.
If they are illustrations, have you verified that the input to the raycast methods are the same? Most network engines compress vectors and its not lossless. But this should be obvious by inspecting the variables.