Why not organise accordingly?
First, there are batteries: solar roofs should come with batteries, than will power the house during the night. Authorities could enforce that, and could also build larger energy storages with batteries at a region level (see recent examples from Tesla).
Then, this is mostly communication: why not make the grid and the roof "talk" to each other and the roof be turned off from the grid when there is no need for it? Is it because subsidies or some kind of mandatory buy from the grid that this could be an issue? otherwise there could be incentive to have this better integration with the whole system.
Otherwise, use bitcoin miners, during the day!