I had the same problem, if you have any controllers like a HOTAS plugged in, it conflicts with the mouse axis and prevents you from using the mouse properly in the inventory. Just unplug whatever controllers you have, if any, and that should fix the issue.