Hi @jorsouto ,
Have you checked if the original lid still has a magnet installed that you could use? Perhaps it is supposed to be integrated in the lid all the time and the replacement didn’t have one. Just a thought as I don’t know if this is correct or not
Have you verified that it is a missing/moved/loose magnet that is the problem?
Check the lid switch settings to make sure that they’re OK.
Slowly run a magnet around the top outside edge of the keyboard/upper case assembly and check if the switch operates and places the laptop into sleep mode or at least turns off the display.
Here is an image of what the magnetic switch looks like, along with its designation (UHST) on the systemboard. So if you locate the switch by using the magnet around the upper case assembly, the lid magnet should be in a corresponding location in the lid. If you can’t find it using a magnet you may have to open the laptop and find the switch.
(click on image to enlarge).
Here’s the hardware maintenance manual for the laptop, that may also help with the dis-assembly as well
Just some things that I’d try