Do you have a controller plugged in/connected? That can mess with the controls sometimes
I just checked with another game that was made with exactly RPG maker 2004, and I'm running into the same issue. It seems that this is a problem with the engine and not your game but thanks for the help
Edit: I decided to look into it and found a solution, for anyone with the same problem navigate to: "Device manager" then go to "Human Interference Devices" find "HID-compliant game controller" and disable it