What part did you replace exactly, the screen assembly ? The hall sensor connects to the I/O board and it’s on the topcase, but it needs the magnet on the lid to be working properly. Unless the sensor was damaged somehow the only reasonable alternative explanation is that your replacement screen is missing the magnet. If you have a magnet around it will be quite easy to verify which of the two fits your case.