From memory, I think it's an either/or logic.
If both fuel switches are set to cut off there's usually a no break power transfer to alternate supply, EG. APU or Ground Power. This will happen before the engine spools down too low to cause the generator to trip off due to low voltage/frequency etc.
If there's no alternative power available and therefore nothing to power transfer to I'm guessing the logic waits for the generator output to go out of limits and then trips.
Caveat, I'm doing this from memory of a training course I did over a decade ago. It's not something an every day line engineer has to think about too often.