Proximity sensor causes phoneto boot loop

I have an iPhone XS that suffered some water damage but was rescued and treated with an ultrasonic alcohol bath and subsequent WD-40. Phone works perfectly except for one thing. When I connect the proximity sensor to the device it boot loops. I replaced the sensor with a new one and the device refuses to boot. It boots fine without any sensor attached.

Does any one have any insight into how I can solve this problem.

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0