Controller input gets 'stuck' infinitely casting [Multi-platform]

I’m on PC using a controller experiencing a bug where a button gets stuck down resulting in the game infinitely casting a single spell/skill, other cast/skill buttons no longer work. I believe this exclusively happens immediately after a loading screen (entering / leaving town or via an area staircase) while casting the spell which becomes stuck immediately before / during / after entering the area.

The scenario is this, I teleport to den of evil, I then press A to enter the area, I then enter the area while casting teleport infinitely until I run out of mana, I cannot cast any other spells during this time but I can drink potions and change direction with the analog stick, L2 toggles the second spell layer but I cannot cast any of those spells. If I press start to enter a menu, the menu functions normally. If I then return to game, the infinite cast stops but I can no longer use any cast buttons, if I press the formerly spammed skill it returns to the infinite cast problem. I have tried swapping to a different controller both before and after experiencing the bug, it is not related to my environment or the specific controller I used. Swapping to keyboard fixes the issue while in keyboard/mouse mode but activating controller mode returns back to the same problem. I cannot use a keyboard / mouse long term. I do not have any other controller software installed except steam, using windows 11.

My theory is the game receives a keydown event, but if the button is released at certain points during loading screens etc it then fails to register the release resulting in the button being stuck. Opening a menu cancels the input, but due to the keydown being held still other events do not work.

I have found other issues which I’m guessing are the same problem with different controllers / platforms:

If my hypothesis on the cause is correct, a hacky fix would just be to reset button pressed state when leaving the menu (Esc on keyboard, Start on controller). While not a bug fix, this is a treatment I would consider this a good solution (Maybe HC players won’t) [Edit: resetting state at the end of the loading screen would work also]. This fix would enable users to clear controller state without tracking down the cause/s. Opening the menu would be almost every users first troubleshooting step and it would fix any similar bugs caused by unrelated issues while having almost no other game impacts or anticipatable regressions.

Edit: I don’t recall seeing this bug with anything but my sorc and use telekenesis to access portals/waypoints.