Alright, sorry about that. I gave it a try in my game and you are indeed correct that the scroll map command is not overridden, but, imo, thought the steady scroll up/down still looked good enough for a train rocking.
Anywho, afaik, you're going to need to make the map bigger, or otherwise zoom the camera in because if you think of what "shaking" is, it's just moving the canvas (the rendered area of the game) up and down or side to side. I believe the camera, within the engine code itself is clamped to the map size, so if the map is exactly the same size as the canvas, then either A) it can't shake because the camera is clamped, and the canvas is too small or B] You can remove the clamping, but you're just going to see the black void. So you have 2 options: increase the area the camera can move by increasing the map size, or increase the canvas by cropping in so that parts of the scene are outside of the current camera.
Doing a quick google search, I found
this plugin.
As the tutorial in the description says, you can lock the camera to an invisible event that has "Through" on. Have the event move up and down (adjust speed accordingly). The camera will follow the event as it moves up and down, and thus it will create a rocking effect.