That appears to be true in places in the US that have time-of-use rates. Sadly where I live, there are no time-of-use rates for residential customers, otherwise I would absolutely do this.
Wouldn’t it be better to fill any shortfall from solar before selling back to the grid?