Hi, can you post the scene structure?
Nodes load from bottom to top while getting ready, if the raycast is on top of the kinematic body in the scene tree, then it has not been loaded while the kinematic body is ready and searching for it, so the kinematic body can't find the raycast, because it's not ready yet.