Keeping coal plants around is cheap to cover that. Longer term things like producing ammonia during summer and converting it to electricity in fuel cells will allow to remove needs for fossil fuels completely.
The main advantage of gas plants is that they support variability. In a world with enough battery storage to last for days that would be irrelevant. And as an insurance against rare events it is better to keep coal plants as transportation and storage of coal is vastly more resilient to interruptions.