2013 Car turns off when reversing, turning the wheel, and ideling

Hi there! I have two 2013 corollas that are roughly 90,000 miles. One of them gives me a check engine light the other one doesnt. They both tend to shut off when i turn my steering wheel all the way to the right and left and put the gear on reverse (while parallel parking) The car also shuts off when ideal. Took the car to the mechanic and it had no codes. Does this happen to anyone else?