Check for poor contact of the ECM and oil temperature sensor connector.
Is there poor contact in the ECM or oil temperature sensor connector?
Repair the poor contact in the ECM or the oil temperature sensor connector.