Hi Mikkel Rasmussen,
I have finally encountered one of these faults in the wild. My thoughts immediately went to the magnetic wake sensor.
Essentially your intuition is right on the money: replacing the sensor is the solution. Alternatively fitting a complete glass and digitizer assembly that comes with the magnetic wake sensor is what I would advise for those who want a time effective solution. Though replacing the sensor itself is probably the most profitable solution.
I hope this helps :)