Perhaps if Sima Yi is sterile. The kingdom still benefits from his brilliance, but without descendants to pass the kingdom on to, he's less likely to make the grab for power, with all the infighting and executions that leads to.
Alternatively, he actually is ill in 247 and dies before he can attempt his coup. Sima Shi either doesn't attempt the coup without his father or fails without his planning.