2006 Saturn Vue P0848 code doesn't get recorded when I shut the car off

saturn
vue

#1

When I drive my Saturn Vue for a while the car with wrench light comes on it reads P0848 transmission solinoid D cuircuit high .but when I turn car off it erases and the computer doesn’t record the code in the computer why would this happen