Why is my raycast returning true to a wall collision that isn't there?

I’m making a 2d game with 3d objects. I have a raycast facing towards the camera for a wall layer. I also have another raycast facing away from the camera to do the same for walls on that side. However, the raycast detecting walls towards the camera returns true when there is a wall behind it for some reason. It shouldn’t return true since the raycast direction is not colliding with any wall.

Here is the raycast code.

173930-capture.png

In my experience 2D functions and 3D vectors normally doesn’t work very good, since you said you are using 3D objects to make a 2D game, would it be possible to use regular Physics.Raycast instead?