Won’t hold charge unless turned on

When the power is turned off and I plug the charger in the light will come on and then turn off seconds later. Although, when I have it powered on and put the charger in it will stay on for hours. Any clue why or what I can do to fix? I’ve replaced the battery and cleaned the battery connectors. I haven’t bought a new charger as I didn’t think it was the issue since it will give a charge, it hasn’t given out yet

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0