Back in October, we reported on a change in the Android 8.1 release that made the proximity sensor behave differently. Unlike before, it wouldn't turn Ambient Display off when you covered the sensor, something we saw even in 8.0 for the newer Pixel 2s. That may or may not have been intentional, but it seems there were also other issues relating to the proximity sensor in 8.1, more about which you can read in this mega thread on the Pixel User Community forum.

Many of the problems specifically affect the Pixel 2 XL, and range from the sensor being confused by things like screen protectors, causing 'always on' Ambient Display to turn off unexpectedly, to not being able to use the device at all during calls. According to a community manager on the forum, a solution has been developed, but it could take a couple of months to roll it out to all users.

Googler Orrin had this to say:

Hey All,

There's been a number of things discussed on this thread, and we have a quick update specific to the proximity sensor issues that some of you have been reporting. We have identified a fix that will be rolling out in the coming months.

We'll post any other updates here on the thread, and thanks to all of those that sent over bug reports and other information.

The OP also mentioned fingerprint scanner issues, which I myself have encountered, but Google didn't have anything to say about that, unfortunately. Like many others, the scanner often doesn't work when I've not picked the phone up for a while, or if there's even the slightest bit of moisture on my finger. It's also been extraordinarily slow since the 8.1 update. We'll keep an eye out for any official word on a fix for that and let you know if anything comes up.

UPDATE: 2018/06/04 12:16pm PDT BY

Fixed in the June update

With the June update, this problem appears to have been resolved according to our own testing. The change is likely due to two functional patches included in the last Pixel security bulletin:

  • A-68114567 & A-74058011 Display Improve consistency of Always On Display Pixel 2 XL
  • A-70282393 Performance Improve proximity sensor behavior Pixel 2 XL

The fix should be rolling out with the OTA, but if you're impatient to see it hit your own Pixel 2 XL, you can sideload the update now.

Source: Google (1), (2)