If the ecm has stored a hard code, then it needs to be reset correctly to clear the light and relearn the fault.
Since your truck is obdII I'm not sure a generic scanner can completly reset the comp. correctly enough to let the ecm resume learning.... this may not matter but just a thought