I would run a hardware test on your phone to confirm this. There's a convenient [guide|154941|iFixit guide|new_window=true] for this. Secondly, you'll need to tear down the device a bit to clean it. I'm unsure if you'll need to remove the LCD panel, but there's a repair guide. You can clean it with some Q-tips and some isopropyl alcohol, but I can't give too much guidance on that.
If cleaning doesn't work, I can only recommend replacing the device's LCD frame or mid-frame housing. The mid-frame housing does contain some small components, potentially the proximity sensor. Also, it's essential to ensure you place proper adhesive post-repair.