Depends on when, that's why we need gas and other dispatchables. We've no grid-scale energy storage as of now. So saying they're cheaper isn't comparing apples to apples.
The storage problem is wildly overstated when we look at data from real world experience. Great thread here explaining how we need far less storage than is often claimed:
https://twitter.com/enn_nafnlaus/status/1565923581246091264