Your battery indicator shows a cool 40 percent and then suddenly, it's dead.
With older iPhones, it's a common problem -- years of use throw off the calibration while the battery's capacity dwindles. We're talking about the iPhone 6S and 6S Plus, though -- these phones haven't even had their half-birthdays.
The issue, according to Apple, is that the battery percentage just isn't updating. As your battery drains, the battery indicator doesn't reflect the depletion. Restarting the phone seems to force the indicator to change, but stays frozen once again.
Fix an iPhone 6S or 6S Plus battery indicator that won't update
Restart your phone. Then go to Settings > General > Date & Time and make sure that Set automatically is turned on.