Latent heat is why you should turn off the heat early
When you remove a pan from heat, the food keeps cooking — sometimes significantly. Cast iron retains so much heat it can overcook a steak by two degrees after you remove it. Pasta, eggs, and rice all continue cooking from residual heat. 'Carry-over cooking' is why restaurants pull protein off heat early and rest it. Learning to pull food 10-20% before done and let carryover finish it is the single biggest habit that separates good home cooks from great ones.
Cook to the temperature you want it to reach, not the temperature it's at when you stop.