I'm not sure scaling raycast nodes is the best method. What I did in one of my games, was put several raycast nodes and different angles (one facing forward, and then two at 30 degrees to each side) and did not scale them. Leave them at the max distance that you want to track, and then if there is a collision, check the distance to see if it's within the limit you want (also, check distance squared, not distance, as distance requires a square root operation and can be slow).
Also, raycast checking does not need to be every frame. If it is for AI, then doing it every half second or even every second should be enough. For AI in general, you don't want to be doing checks and state changes every frame. It wastes performance and actually looks worse. For example, if an enemy is walking, it is more realistic if there is some delay between when an event happens (such as seeing the player or reacting to a grenade) as in real life if would take a moment for them to see and recognize what happened, and then determine how to respond.
You just want to make sure that there is an offset, so there aren't 20 enemies all calculating their state changes on the same frame. So if you picked 1 second as the tick rate, then on the ready function of the enemy, find a random number between 0.0 and 1.0 as an offset to the check. Then you can create a timer that updates the AI state. The timer itself would be on a 1.0 second repeat, but use a delay of 0.0 to 1.0 (from the random ready function) as a delay to start the timer. That way the logic is spaced out.