What is causing my engine cooling fan to shut down causing overheating. on 2003 Lincoln Town Car

My 2003 Lincoln Town Car cooling fan shutdown occasionally when it should be on causing vehicle to run hot, lost of fluid and check engine light to come on. The fan was replaced but it still do it. Thermostat is okay. diagnostic code only show the vehicle ran hot.

Asked by for the 2003 Lincoln Town Car
What is the designation of the trouble code stored (like P0420)?
The cooling fan motor has power all the time from a 50 Amp fuse make sure the fuse is good, make sure the connections are good (no voltage drop, black wire at the cooling fan needs a good ground, and the red/orange wire at the fan motor is operated by the power train computer to turn on the fan when the computer decides conditions are met that require the fan on.