Some Pixel 2 / XL phones reboot randomly. This could be the reason
Well, until earlier this week at least. On the 20th of November, user Nader Babbili posted that the issue disappears if one were to go into Network and Internet settings and disable LTE. Apparently, 4G connectivity seems to be the culprit, as a low signal was what was triggering the reboots of Mr. Babbili's phone, or at least that's what he theorizes. Switching over to 3G reportedly cures the random reboots.
Android Police has speculated that the LTE modem of the phone could be causing a kernel panic for whatever reason. In the meantime, Google support advises those that complain to apply for device replacement under warranty.
Things that are NOT allowed: