Energy storage leads to a larger gap in lithium batteries