We should remember how auto-completion works. It has to suggest completely different things for each different type. In the
_ready() function you assign the node variable and godot internally already has a look at the node you're trying to get. So it knows it's type and knows what functions it has. But in your
_process() function there is no such way for godot to know what type your variable will have and thus it cannot do auto-completion. There are several ways to get it working, like the one you already have done. You could also do
(node as RayCast).is_colliding()
that is useful if your
node variable is going to have different types in your game but at this specific position it only should have a special one. This should also work with self made class_names, but idk.
Well, hope it helps. Good luck, Jowan