If the battery charge increases significantly after disconnecting the charger, then it indicates the battery is most likely bad. There is nothing you can do about this except to have the battery replaced because it is the chemical reactions inside the battery that are causing this to occur.
Check to see whether the battery condition is something other than "Normal" or "Good" since any other condition indicates a worn out or failing battery which Apple will replace. Option-click on the battery icon on the menubar to see the battery condition. If the condition is "Normal", then it is possible no condition will be listed.
Have Apple or an Apple Authorized Service Provider examine the laptop and run their service diagnostics. Ask them to run the Cooling Diagnostic since I have found this test tends to find some battery failures when their default MRI diagnostic finds no problems. It can be very hard to prove to Apple that a battery is failing since the diagnostics don't always report a failing battery even if the battery has a hardware fault.