I do not know if this applies and it is real strange but some years ago I worked on a ford with the same fault. It turned out that there had been or was a facility for an electric choke as well as fan, the choke and fan sensor plugs and sensor wher vertually identical in apperance and as you may be one step ahead the fan was connected to a choke swith not fan swith in the cooling line.
this gave exactly the same results you discribe.
Other than that dissconnect the fan swith / sensor fron the cooling and see if still runs ign on / off etc, if no a swith problem seems to exist.
If yes then relay / ign problem.
Have you disturbed any of the fan relay wiring as the relay coil ground or connections may be the issue here.
need more info