Look up the datasheet of the protection IC used. (µPC1237?) It probably has an "AC detect" function to shut off the output more or less immediately after the power has gone out, with a sensitivity (secondary voltage) adjustable over a wide range via a resistor.
We had this topic come up recently with a uPC1237 board (mod included). The problem there was that the OP wanted to switch to a SMPS, where there's obviously no mains AC as such. I recommended a small (3 VA max) additional transformer.