Capacity and generation are two different things. Grid operators have capacity markets that ensure peak load can be met, and incude generations assets, demand response, energy efficiency, etc. Batteries absolutely coumt as capacity so long as they are managed to do so.
That’s twice now, RIP in peace friend