webworkings :
It is very common for a battery that is going bad to show it has way more of a charge than it does, as it can't hold the full charge anymore.
The battery actually has a full charge. As a Li-ion battery gets worn, its ability to put out
current is reduced. When new, it might have been able to put out 4 Amps at 100%, 3.5 Amps at 50%, 3 Amps at 10%. But after it's worn it may only be able to put out 3 Amps at 100%, 1 Amp at 50%, 0.5 Amps at 10%. If the laptop needs at least 1 Amp to remain on, the battery will charge to 100%, but the laptop will suddenly turn off at 50%. If you were somehow able to use the laptop while drawing less current (e.g. plug in an external monitor and turn off the laptop screen), the battery would work to a lower % simply because the current draw is lower.
I'm guessing you left it unused with a low or drained battery? That's really bad for the battery. Li-ion batteries slowly self-discharge. The two worst things you can do for a battery is charge it to 100%, and discharge it to 0%. The anode in the battery actually physically swells and changes shape. So at 0% and 100% the anode is at an extreme state of physical distortion, and suffers more physical damage than at intermediate charge states.
https/www.popsci.com/science/article/2010-12/lithium-ion-batteries-swell-and-contort-while-charging-new-study-shows
If the battery was drained and you let it sit for 2-3 months, then it would've self-discharged below 0%, damaging the battery.
If you let it drain below 0% too long, the battery is designed to kill itself. Li-ion batteries which have been over-discharged have a nasty tendency to catch fire or explode when you try to recharge them. So the battery circuitry is designed to make it commit suicide if you ever let it get to that over-discharged state - it will refuse to accept a charge. It sounds like your battery didn't get quite this low, but got low enough to severely damage the cells, causing the sudden shutoff after 15-20 min of use.
If you need to store a laptop unused for several months, charge it to about 70%-80% first. That'll give it plenty of room to self-discharge without damaging the battery. You don't want to store it at 100% either because being charged to 100% and spending a lot of time at or near 100% will slowly damage it too.