Hi
chayanray While other users can confirm and reply.
Once your proximity sensor stops working, run SMMI test and check if there is anything to do with the hardware.
How to Enter SMMI_TEST (test hardware)
Go to Calculator=>type " .12345+= "
you will be entered to SMMI_TEST
Try Factory reset once to clear any bug