When you place the phone to your ear, it should activate the proximity sensor and make the screen turn off.
Can you try restarting the phone and see if that resolved the problem? I have read other forums where users note a "bug" in Android 9 Pie that the proximity sensor (that's what tells the phone it's up by your ear) stops working after a while and only works again after a reboot.
Curious to see what your experience is... I haven't seen this problem on my original Pixel XL.