I got a Pixel 2XL just over a week ago to replace my Nexus 6P. Used to ALWAYS charge overnight and now I'm switching up my charging habits. Much like many others, towards the end (and really for about the past year TBH), the battery life on my 6P was beyond terrible. Would initially start to "die"/shutdown when the battery got to around 20%, the towards the end it was close to 30%+ most of the time it would act like the battery died. While I've read that the issue could have stemmed from any number of things from software to just "bad batteries" used in a general sense, I'm sure my tendency to just charge it overnight likely didn't help the situation over the longer term.
Hoping that with the 2XL and my new habit of trying to charge it when necessary will help to prolong the life of this one. The 1.5-2 day life I'm getting right now based on my usage is sure making that approach much easier!!
