On my Nexus 6p after replacing the battery with a new one that seems to otherwise be working fantastic, if battery charge is ~60 or less and I take a picture with HDR turned on, the phone dies and won't turn back on unless I plug it into a charger. Only have to plug it into the charger to turn phone on, then unplug and battery is still at same charge as before it died and works great as long as I don't take HDR photos. Works fine with flash on or off, but HDR must be off.
I'm not sure if this was happening before I changed the battery, because it was my son's phone before that, and he rarely took pictures. The reason for changing the battery on this 1.9 year old 6p is because with original battery it would shutdown at 15% life remaining, and it drained very fast. New battery does not have this problem and has great battery life, but does have the HDR problem. Got new battery off Ebay, as have a lot of other 6p owners with good results.
One other curious thing is that if I leave phone on charger for a few hours after fully charged, battery level starts to go down while on charger. This was also true with original battery. Other phones I've had stay at 100% no matter how long on charger. It is supposed to be safe to leave plugged in, as charging technology now protects from overcharging. But my Nexus 6p seems to cut off charging altogether after it's been at 100% for a few hours.
My fix for the phone dying while taking pictures is to turn off HDR in my 6p camera app.