2006 Toyota Corolla - Engine turns off. Scan says this

My car’s engines goes off while driving and sometimes in the morning when you start .I have checked with the OBD scanner and it detected that the engine coolant temperature sensor performance range.I have changed the engine coolant temperature sensor buy still no improvement

post the actual code your scanner gives you here - this way you have better chances to get a free advise from the professionals who frequent this forum

currently your description has not enough details to catch any advise

A bad crankshaft position sensor will cause that.

Tester

I don’t see how a error code for the coolant sensor would cause a shutdown of the engine. There are a number of things that could cause the engine to shutdown without showing any error codes to give a clue to the trouble. I would suspect a intermittent power problem to something like the ignition may be causing the trouble.