I want to share a solution with you, which worked for me with my Logitech Mouse, because the other solutions (like remove the other devices) did not work for me and I also did not want to rollback the Windows Update. There is a tool called "Logitech Setpoint" (possibly, there are similar tools for other manufacturers). In this tool you can define customized keyboard-shotcuts instead of the standard functions of the mouse buttons.
For example: I change Button 4 from "forward" to "Ctrl+D" and Button 5 from "backward" to "Ctrl+F". As soon, as I did this, the league client (also ingame) accepted the buttons, and I could re-assign them and my problem is solved.
By the way: in the setpoint tool, you can also do that just seperate for certain applications, so the main forward/backward - function in browsers etc. can stay. Info: the league game client is located in: ...\Riot Games\League of Legends\RADS\solutions\lol_game_client_sln\releases\xyz\deploy