2005 ford explorer

check engine light is on…the obdII says #5 cylinder misfire…i’ve done evrything….smoke test….changed the jet…new gasket on #5…new coil pack….even the ford dealership can’t figure out whats wrong. It skips for the first couple of minutes and then runs smooth. they could only get the check engine light off long enough to pass inspection….then right back on….what else could it be?