Baffling mouse behaviour, side buttons switch

Without rhyme or reason, from one boot to another, the side mouse buttons on my razer deathadder swap M4 and M5… just getting used to having it reversed, now it’s back to normal again. I have no idea what I should try other than binding key presses to the buttons but they swap either way.