You lot are just about to love me to bits, because I'm going to save a !&&* of a lot of money and grief.
I've checked out the sensor and the cause of this problem and it's none of the answers above.
If you look carefully at the old screen, left behind is a double sided foam where the prox was.
What's happening is as you lever the flex out, no matter how carefully, the foam pulls on the prox such that it damages either the solder connection, or the leads of the actual device.
If it's the solder connection, a quick all round with a rework wand or possibly soldering iron will remake the dry joints and get you working again.
If the leads have broken, game over sadly, you'll need to replace it.
The theory of putting tape around it and it then working isn't to do with light, simply that the tape is putting pressure on the joints and they work again.
Prevention is better than cure though right?
Just before removing the flex from the old screen, simply heat the front top of the glass until it's too hot to touch, be careful not to melt the flex leads!
Leave for 30 seconds
Gently pry the prox out. The foam is now soft, it'll give way easier, making it less likely to damage.
I'm here all week, don't forget to tip your waitress ;)