Chosen Solution

My proximity sensor has gone bad. If I plug it in, my phone boot loops. If I unplug it, the phone boots up fine. I know that that sensor assembly allows Face ID to work. If I replace the whole earpiece and sensor assembly Face ID will not work. My question is is there a way to maybe solder or other technique to just replace the proximity sensor on the original earpiece and sensor assembly.

Hello there is some information about face id and front speaker flex in this video hope it helps https://www.rewatechnology.com/how-to-fi