It’s normally because you’ve got a signal contact touching the grounded shielding. Don’t fit the jack plate to the guitar but plug in a lead and see if you get any sound. Or it may be something in the main control cavity. There’s not a lot of a gap between the selector switch and the bottom of the cavity. Always a good idea to put some insulating tape on the shielding in areas where there may be contact with signal wire connections.