Vines addressed this in his answer, but let me expand on it:
It's a question of how the Gateway/Poweralls can communicate with the solar inverters. If there's an out-of-band (separate communications channel) way for them to speak to each other, that both support, then absolutely that would be possible. I believe that's the case with the PW+, for example, where the Gateway and the solar inverter are integrated in the same (upper) box.
Failing that, the only way for the Gateway to communicate with the solar inverters is in band, via the AC waveform. When the whole system is on the grid, the Gateway/Powerwalls have no control over that, the Powerwalls are just grid-following inverters. While when the Gateway disconnects from the grid, the Powerwalls now run in grid forming mode, and have control over the AC waveform. They can force the solar inverters to shutoff by shifting the frequency of the AC waveform they are generating.
Cheers, Wayne