Cessna 172 not switching off despite fuel cutoff, engine turned off and mixture at 0%

If you turn off the magnetos or pull the mixture all the way out the engine should be ‘running’ in the sense it is generating any power, but if it is windmilling the whole thing is still turning. So it will make some noise, but less noise.