Here's a video of the experiment:

According to Android Police, this happens because the device's accidental touch protection feature is just bit too effective. The good news is that it's a software issue, and Google is already working on a fix. Orrin, a Pixel 2XL Community manager, posted on the thread to inform people that the Pixel team is already investigating and addressing the problem in an upcoming over-the-air update.

In an effort to preempt similar complaints about bluish or greenish tinted screens and burn-ins, Apple recently updated its support page to explain that those are perfectly normal for OLED displays like the iPhone X's and Pixel 2 XL's. Nevertheless, iPhone X's screen seems to come with its own set of issues. Some of them have a nasty green line going down their edges, while others stop responding to touches in cold temperatures.