Lawnmower batteries have nothing to do with the engine running. It is there for starting only. If the charging system is working it runs the PTO and charges the battrey and runs lights. If the PTO is slowing or stoping then the charging system is not working.
With all that said what is your mower doing when the battery is getting weak?