How to really disable the screen when the phone is on my ear?
It seems to be an issue with proximity sensor malfunctioning. Instead of forcing the screen to be off, you can try :


There are many apps on Play Store, search for "Proximity Sensor". Proximity Service seems to be a good choice. It has a good rating, has been updated last month and doesn't have any trackers (no privacy issues). If this doesn't work, try other apps. 
You may want to go the automation route as explained here Screen turns off during call due to problem with proximity sensor - Xperia Z3 compact (case there is opposite of yours, so it needs to be tweaked) 
Per this blog (though for a different model of Xperia) , you can test and reset proximity sensor by dialing *#*#7378423#*#*