Inverters can be configured with export limits to limit, or entirely halt, energy exports based on market or grid signals. Term of art is "curtailment."

https://en.wikipedia.org/wiki/Curtailment_(electricity)