PS5 controller axis issues

Hello, im trying to implement a joypad functionality using my PS5 dual sense controller. I have a script to map the buttons and axis for controllers identified by my system. My problem is that my code used to work fine. Stepped away for about 6 months and now the right axis thumb stick is not functional and continuously shows the right x value at -1 ( full left) and right y value at 1 (full up) and i am unable to understand why this is. When i use my controller for playing games on steam there are no issues