How to keep my screen light on during the call (Nexus 4, Android 5.1.1)
I had the same issue and had to replace the sensor (I gave up on software solutions).
The sensor is very easy to replace but you need to buy it (I received it from a broken Nexus 4, which had the sensor working fine!)