I don’t think mandating ground parking is the same as requiring solar panels on the roof. Solar will eventually pay for itself?
In 10 to 30 years.
In the meantime you have to pay the capital costs upfront, so the home will be more expensive upfront.
So if you assume that it takes 30 years until the house has amortised (via rent or saved rent), why not assume the same for the solar roof?