Next time it happens try pulling the connector off the Trinary switch on the AC pipe the one just above the clutch reservoir.
High pressure in the AC will cause the fan to run but I don't think it should continue with the ignition off.
Worth trying though as it is a simple test