When you plug the sensor cable. The ESC will automatically operate in sensor mode. It is better to change another sensor cable to see whether it can be fix or not. If it can fix, then the problem is the sensor cable. If it cannot fix, change to another normal motor. If it can fix, then the sensor board inside the motor had problem. It will easily find cold joint in the sensor board. If you had solder iron with enough power ( above 80W ), you can try to re-solder all the solder joint to see whether you can fix the problem. Otherwise, you need to change the sensor board.