As promised, I did some (actually a lot of) research on this matter, and my conclusions are that connecting an off-grid inverter to the grid is not compliant with CEI 021 standards but can be legal if the installation is done ‘properly’ and certified by an electrician.
In summary, the fact that it is not compliant with CEI 021 does not mean it is illegal.
Actually, it is enough to have an Enel meter, even if it is completely disconnected and not used, to be ‘non-compliant with CEI standards’ if you install an off-grid inverter. Therefore, the CEI 021 standard is very restrictive, but it does not mean that your system is illegal. At least, this is what I have been able to understand.