Apple has issued a support document describing how to handle the issue if it pops up. Once your ‌MacBook Pro‌ drops below a 90 percent charge, you should connect it to a charger, quit all applications and let it sleep and charge for eight hours, minimum. After that, update to the latest version of macOS. If it continues to shut down after that, you should contact Apple to get it serviced.

It could just be a batch of these models that have had the issue, but it's worrying in light of Apple's ongoing butterfly keyboard issues. With its latest 16-inch MacBook Pro, Apple has dumped that keyboard, but the litigation might still linger for a long while.