Was having this problem on my Logitech MX Master 3, where middle click (and mouse4/5) aren't recognized by the game
This thread on reddit was a huge help, and fixed my issue to get middle click working.
Another user in that thread modified the inputmappings to use the G key instead of...