Aah, I see, you should use the angle between previous vector and normal to mirror the vector across the normal and get next direction. Something like this:
var angle_to_normal = (start_point - end_point).angle_to(result.normal)
start_point = result.position
end_point = result.normal.rotate(angle_to_normal) * diagonal + start_point
It should give you a similar result, you want. But the normals seem odd in your case... Can you print them and comment them here? I think they should be perpendicular to the wall, but they're not. In documentation it says:
normal: The object’s surface normal at the intersection point.
And the surface normal of a wall is always perpendicular.
I suggest you try mirroring it, if it's not the same as ball bounce, post another question with "collision normals don't reflect surface normal".
I also see another issue you will be dealing with... One raycast would not be enough, as it may go beside a wall, but the ball would hit it because it's wider, so the ball would bounce, but ray would continue. One option would be to use more than one raycast (3-5, or so that the distance between the raycast is bigger than the smallest object), and check which one is the shortest (and use it's normal). Alternative is to try actually simulating another ball, with higher speed, it should be simpler than raycasting, and could produce better results, but... everytime the mouse moves, you shoot another ball, high speed, just to get the angles and draw it's position. The issue with this approach is that with very high speeds, it may happen that collisions are not properly detected, because the ball could be in las vegas instead of colliding with your wall.
There also exists the Shape query 2D. First set all the Shape query parameters, so motion and shape (your ball and it's starting direction). And use cast_motion function. It seems to me that it doesn't return any normals, nor does it simulate anything. But you might need it, because with raycasts, it's difficult to determine collisions with edges (maybe by recognizing when neighbouring normals point in different directions).