The problem turned out to be mechanical. The arm that I mounted the camera on had developed a crack where it connects to the build platform. I used some superglue to repair the crack and the camera shaking went away.
The lesson here is to check EVERYTHING mechanical before trying to blame shaking on the firmware.
I'm having the exact same issue, SKR1.4 Turbo with 2209's on i3 clone and it started when I tried to enable G34 auto-alignment. I very briefly had it fixed by disabling the auto-alignment and I wish I knew how because now I can't even fix it with a fresh download of Marlin and no G34 to begin with.
I took the gantry off and watched the motors turning because ...
Your question is missing important information, but I can try to figure out something. You didn't say what kind of firmware it is. I assume it is Marlin.
Your problem is that there are no Tx Rx pins specified for Z2 (because there is X, Y, Z, E0, E1 by default on the MKS Gen L board)
I assume you want to use the E1 driver for the Z2 instead of a second ...