Recently The users of Google Pixel and Pixel XL reported that Bluetooth will switch off automatically.
Google announced before that it is aware if this bug and fixed it, will be rolled in next roll out.
Google has announced today on Pixel User Community that the issue is fixed.
It was on server side, and updated to the devices through google play store update in background.
Please let us know in the comments that you are facing this issue or not?