Shutting down the engine is not the same as releasing the brakes.
The AAR Triple valve sets the brakes upon loss of pressure on the train's airline that runs it's entire length.
If the pressure in the train line is lower than that of the reservoir, the brake cylinder exhaust portal is closed and air from the car's reservoir is fed into the brake cylinder to apply the brakes. This action continues until equilibrium between the brake pipe pressure and reservoir pressure is achieved. At that point, the airflow from the reservoir to the brake cylinder is lapped off and the cylinder is maintained at a constant pressure.
If the pressure in the train line is higher than that of the reservoir, the triple valve connects the train line to the reservoir feed, causing the air pressure in the reservoir to increase. The triple valve also causes the brake cylinder to be exhausted to the atmosphere, releasing the brakes.
As the pressure in the train line and that of the reservoir equalize, the triple valve closes, causing the air pressure in the reservoir and brake cylinder to be maintained at the current level.