USB doesn't have very good interference protection, and I'm guessing the spindle is generating a lot of electrical noise.

You could spend a lot of time tracing the problem, but as a first attempt, I'd suggest trying a USB isolator.
This is the first one I found via a search to give you an idea of what to search for - https://www.ebay.co.uk/itm/324127452071