I've long thought that any country should buy solar panels from any other country that's crazy enough to sell them to you at a subsidized price. It's not like buying oil; once you have the panels, that energy independence belongs to you.
Grid and energy producers will have nothing of that nonsense. If enough people do that, they will see their business crumble and because they are an "strategic sector" they have enough sway on most countries to pass laws that prevent that.
In the end you have to replace those panels and nobody in your country now produces them or has the incentive to start producing them unless they not only drop the subsidies but sell well over market value.