Under braking.. the force of the wheels slowing down Via braking) is greater than the force of ineria and gravity acting on the the flywheel to slow it down..
So the force of the brakes slowing the the car and hence the engine, as it is in gear, will over come the force of the flywheel attempting to slow the engine down..
And besides.. its easier to stop/slow down a rotating object of less mass than one with more.