RayCast (if you're about a node) "lasts" as long as its
enabled property is
I haven't seen your code, but seems like you're turning it off, right after mouse event is processed.
If so, you need a one-shot Timer to turn it off: Mose event makes both
RayCast.enabled = true and
RayCast.enabled = false should be executed only from Timer's signal (