https://github.com/godotengine/godot/issues/72894 - same bug
A weird problem has occurred in the godot v3.5, where a Raycast2D doesnt completely collide with a CollisionPolygon2D (which is inside an area2D) and only does so on the edge of the polygon.
While testing the raycast with a normal CollisionShape2D everything works fine.
Also i have tried out this same test in godot v4 and once again everything works fine. So, i am quite stumped on why its not working in godot3
I would really appreciate any help
(see video to better visualize)