You don't sell the energy. Well you kind of do, it's just that they don't pay you in real money. They pay you "kWh credits" which are theorized to offset your consumption in the winter months where solar energy production is lowest. The catch? Those credits expire in one year if unused. They do not accumulate.
So brazilians are financially incentivized to produce as much energy as they consume only. Any energy surplus means giving energy away to the power company for free. Since solar energy production is variable, one also needs to be clever with forecasting in order to estimate highs and lows so that they compensate for each other. Make the summers pay for the winters.
I suppose one could simply work around all that regulatory nonsense by not actually generating any credits in the first place. Build a small system that generates less than needed since that still means significant energy cost reductions. Alternatively, increase energy consumption. Air conditioners are god's gift to brazilians but there are only so many you can buy before you run out of rooms to install them in. So that leaves... Converting any surplus energy into cryptocurrency instead of injecting it into the grid. They won't pay us? We'll pay ourselves by mining monero.