I had the same problem, that the proximity sensor stopped working.
The solution that worked for me was to install the app com.hatcyl.android.Hardware_Disabler (sadly not in the playstore (anymore?))
Found it by googling it - correct size=99105bytes md5sum=cfdf0eaec8c259a8c43ce3cfcb3771f2
Got...