I literally have the same issue with one of my old laptops, around 10 years old now and battery is kaput, even with a 100% charged battery, sometimes it may work for an hour, sometimes it'll randomly turn off after 30 mins even with 70% battery remaining. Cant even get a spare battery for it...