If it's fully charged, then it's no problem. I can keep it plugged in.
If the battery needs to be charged, I have to turn it to "Power Saver" and maybe it will charge while I use my laptop. Sometimes it doesn't, though and I have to keep it off until it finishes charging.
The power supply, charging circuit, or the battery is the first to go on a laptop - at least on my laptops.
The laptop is so old, I'm not sure if I want to buy another power supply or battery for it. However, I need something to continue writing.