a reed switch is used to determine if the lid is open or closed. a magnet is used to close the circuit of the switch, when the magnet is close to the reed switch.
in your MBP, the magnet is located in the display bezel, along the right side, about the middle. you can find its location by putting a paper clip near the right bezel until it sticks.
the reed switch is in the main body of the MBP, in a position on the right side that would match the magnet when closed. it's possible that either the reed switch or magnet have shifted slightly? or your lid isn't closing completely. I say this because when you press the lid, it seems the reed switch is closing like normal.
take a close look at the lid when closed to make sure there's not an abnormal gap. or if you have recently opened your MBP for servicing internal parts, make sure you didn't move the reed switch or magnet
I suppose it's also possible the reed switch is damaged, although that is less likely as it's a very simple device. I've heard stories of people running a magnet up and down along the right edge of the computer and the reed switch starting to work reliably again after that.