hi! i did actually fix this! if you open your minecraft you should be getting a really quick error message flash on your screen, i missed it the first like 20 times i opened my game, however it should be telling you to run GameInputRedist.msi which is basically the whole program that connects mouses or controllers to your game.
the way i did this was by opening my task manager and finding GamingServices, right clicking it, and clicking Open file location, after that i found GameInputRedist and clicked it, it prompted me to install so i did. after that, i gave my computer a click restart and it started working again! i hope this helps for you :)
how long did you wait inbetween installing it and restarting your computer? when i installed mine it would ask to install but i'd never actually see it happen. i'd suggest trying again and then giving it a few minutes, just incase you might not be giving it enough time to install.
unfortunately this is really my only suggestion besides some basic stuff google would tell you, such as updating your mouse drivers etc. i've had this work for multiple other people so maybe try my suggestion before completely ruling it out, unless you have already. i hope you find something that works for you!