I have had that battery issue before with a Moto Z that I bought in November 2016. The issues started around August 2017. When I had the issues I prolonged the use of the phone without replacing it by using a battery mod, but after some time it would power off even while on the battery, and would immediately power off the second I took the battery mod off probably a few months before that.
I eventually gave into buying a new battery for it and attempting to replace it myself. I rooted the phone first thing when I initially got it, so I didn't try doing official repairs since warranty was voided. Ended up breaking the screen in the process, ordering a new screen (had issues), and then ended up refunding the screen and just sending it into Motorola for replacement. The new 3rd party battery did seem to work without issue for the short time I tested it, so that may be an option, but might end up needing to be replaced in a year. The screen was really easy to break though.
I got a refurbished phone back and it is just now starting to show the same issues again (Replaced it March 2018, have not rooted yet). Had it abruptly die at around 20% earlier today. Not that bad but good to know that it may be starting to happen with this phone. This one I still have left plugged in every night, but without the turbo charger.
Debating on the next phone upgrade right now or if I just want to downgrade to a Moto Z Play I have laying around if it becomes unusable. I will still keep them around since I mess around with the dev kit, but not planning on getting another Motorola as a main phone if I get a new one.