I have a similar issue here. I had the display panel and the battery on my Iphone 6s replaced in January at non-AASP. They gave the replacement job a 1-year warranty. All this time there's been a tiny dark area on the top-right corner of the display. Yesterday I finally got fed up with it and had the display replaced again, at the same place.
The replacement display was a total piece of junk, being unresponsive on several spots. So I went back there again, and at the same breath complained about the poorly functioning proximity sensor. Ok, the front camera was replaced too, along with the display.
After leaving the store and walking to a bus stop, I noticed that my phone shut itself down. I turned around and headed back, with my phone shutting itself twice on my way, and the guy checked inside my phone, finding nothing wrong inside, but making quesses of a motherboard gone bad or a bad quality spare part. I explained to him that I'm almost insanely careful about my Iphone, and throwing it around my apartment isn't my cup of tea.
He then advised me to do a factory reset, in hopes that this might do the trick. Well, it didn't.
Servieris Sales suggested there that an issue like this might be caused by a faulty proximity sensor cable. So, my question is, how likely is this? Thanx!!!