I have a batterry problem for around a week now. Battery seems better. Its draining a little slower than normaly. But between 30 and 70% (each time its different) in a few seconds it goes to 20 and 3 and 0 and shutdown... I found only 1 post about this and there are no good answers and its on Reddit: https://r.darrennathanael.com/r/pixel_phones/comments/1f3qdh8/pixel_7a_battery_issue/#
Im running GrapheneOS so warranty is probably voided.
The percentage is based on voltage for lithium batteries. Old or weak batteries will suffer voltage droop when under load, so the device is powering down to protect the battery from over-discharging and causing damage (or a thermal event).