Hello, I'm Greg, 10 years awarded Windows MVP, specializing in Installation, Performance, Troubleshooting and Activation, here to help you.
Does the same thing happen in Hibernate or Shut Down?
Here's how to enable Hibernation which is a deeper sleep which actually powers off after writing the RAM to Hiberfile, then when you power on it loads Hiberfile so everything is where you left it, and it starts much faster:
https://www.groovypost.com/howto/enable-hiberna...
Run the Power Troubleshooter from Windows Settings > Update & Security > Troubleshoot > Additional Troubleshooters.
Try these fixes for Battery Not Charging:
https://www.groovypost.com/howto/troubleshoot-b...
https://www.kapilarya.com/fix-battery-plugged-i...
Check the manufacturer's Support web page for your full model number to see if there is a battery issue or recall for it. Remember you have a full one year warranty for PC and parts replacement or repair so I'd use it if still available.
Run the battery re-calibration here: https://www.howtogeek.com/172271/how-to-calibra...
Then generate a battery report and post it back here: https://www.groovypost.com/howto/generate-batte...
Right click Start to open Device Manager, under Battery choose the battery device, then Driver tab, then if available Roll Back the driver. If not available, choose Uninstall Driver, restart PC to reinstall.
If nothing else helps then you might need to replace the battery or the charger.. However I will tell you that most OEM after-market batteries and chargers have problems so I would only buy the official manufacturer's battery from the PC maker to be sure. Another option is to take it to a shop where they will plug in the Universal charger to help determine for sure which one works and should take it back if it doesn't.
I hope this helps. Feel free to ask back any questions and keep me posted. I will keep working with you until it's resolved.
________________________________________________________
Standard Disclaimer: There are links to non-Microsoft websites. The pages appear to be providing accurate, safe information. Watch out for ads on the sites that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the sites before you decide to download and install it.