I do have the 2-in-1 version of the XPS 9310, which was only available with Windows, replaced it with Archlinux. In the 1st ~3 months after launch (of the Windows product, Dev version wasn't released yet) I experienced this problem too, but nowadays, s2idle drains the battery < 5%/day. So I highly guess your Ubuntu version has an old kernel where it's bugged.
Which takes us to the main issue, the preinstalled Linux on all Dell machines I had is garbage, premium support only helpful for Windows customers. Why do they then even offer this option? Sadly, when Lenovo started offering Linux preinstalled, they claimed it's a feature that they only ship open source drivers, even on nivida machines. Don't know much about the HP dev one, but partnering with System76 is hopefully making this a better OOTB experience.