It has to be caused by uneven fuel distribution when the fuel is shut off, because the mechanical balance of the engine is obviously just the same.
Are cylinders robbing fuel from one another (inside the inlet manifold) or is the fuel distributor failing to maintain a properly distributed fuel flow to all cylinders? Or is it just that as the mixture becomes very lean, the combustion is extremely sensitive to the exact ratio?
More likely to be a mechanical resonance IMHO. The engine is a heavy lump mounted on relatively flexible rubber mounts, which will result in a low resonant frequency – much lower than normal engine rpm. However, as the engine stops, it winds down through the speed range from idle to 0 rpm, passing through the resonant frequency at some point. You can see a similar effect in washing machines and older car engines.
One simple way to find out – shut down using the magneto switches. If it is still shaking, it has nothing to do with uneven combustion…
The low torsional natural frequency of the engine on its mounts is excited. The forcing function is the substantial inertia of the rotating propeller being reacted by engine compression as it rotates to a standstill.
I observe this mainly with Rotax engines …
A PT6 does it as well although not as much as a piston.
The reason is probably self-ignition. The prop is directly connected and can do a lot of harm. If fuel remains in the engine it could theoretically self ignite.
Silvaire is correct.
In simple terms, the isolators have an elastic stiffness – K – and the engine has a mass – M .
The system will resonate at a frequency sqrt(K/M).
This is designed to be below the shaft frequency in normal operation, but you will pass through that frequency on shut down and start-up.
The same effect can be seen on cars and washing machines.
Also the engine mount itself probably isn’t particularly stiff in torsion (low K)