Why doesn't this work, and how could i make it work?

Yes, but the joystick doesn’t output a square because the joystick itself is a circle. (it’s not a super circular circle as you can see here)