MacBook Pro battery dies instantly when opening the lid
I have a 2019 Macbook Pro 13 inch Intel i5 that has worked very well over the years. I often put the computer to sleep by just closing the lid or by clicking the apple icon and selecting sleep. However, about 6 months ago the computer started randomly dying even though the battery health is normal and the computer often has 50% or more battery before putting it to sleep.
Initially I thought it was the battery draining while asleep and that's what most of the issues seem to be when researching a solution online. However, that isn't the case with mine. If I open the lid and the computer is dead, I have to plug it in to turn it on. Then when I log back in the battery indication is often back where it was when I put it to sleep (i.e. 53%). Sometimes though it's at completely 0%. Then if I look at the battery settings graph it clearly shows the computer having charge until I happen to open the lid, at which point the graph drops to 0 instantly.
I really have no idea what's going on and it's very frustrating. I've started quitting all programs before closing the lid in case they are at fault and yet the problem still occurs randomly. As a result I have to always have the charger on hand in case this issue occurs. Has anyone else had this issue? Any possible solutions? Thanks
MacBook Pro 13″, macOS 14.5