Maybe McAfee services or Windows Registry keys (specially legacy ones) were not properly uninstalled and something is conflicting...
avast is only an antivirus and should not avoid proper mouse (or other hardware) working. If you search the board for the word
wireless maybe you can find something.
Welcome