I managed to fix it using the Fairphone Proximity Sensor app: https://play.google.com/store/apps/details?id=com.fairphone.psensor
open