The term you're circling is "grid defection".
> must be connected to the grid.
That's a legislative problem. If a home can prove it can produce enough electricity for itself, it should not be forced to be connected.
> You can 'fix' this by making it so every home has a fixed 'connection cost' and then a smaller 'usage cost' on top
A lot of places already do this.
It's not a legal problem. The reality is that the vast majority of homes with solar must be connected to the grid because that's how they're wired and designed. You can do a completely off-grid approach, but it's more expensive and requires large batteries. Most people just do the simple panels and don't have any intention of going off-grid.
Also: Even if half of a neighborhood doesn't need the connection, the work ends up being similar. It's more based on distance/area.