It shouldn’t. Yellow lights are supposed to last an amount of time based on the speed limit at that section so this doesn’t happen.
Traffic simulations are generally quite complex. In your proposal, if your approach is not detected correctly, you either stop traffic for a car which isn’t there, or you never stop traffic for a car which is there.