I had this exact problem, and solved it by desoldering the red wires from the back of the volume pots and adding heat shrink to them.
First I tried replacing the preamp with 500k volume pots and a 250k tone pot and 0.047 cap. That did nothing. Then I started shielding everything! That includes the back of the scratch plate, pot cavity, and pickup cavities; all connected to ground. It didn’t work. Finally, I disconnected the red wires and as of by magic the bass was perfect.
I feel stupid for not reading the whole thread first! Oh well. One day I may put the preamp back in, but for now I’m good. I had bought this bass for nearly nothing, so I presume the seller was lowballing the price due to the buzzing. I’m glad I could fix it with just a soldering iron. I’m shocked the factory let the basses out in this condition