On a different (and larger) machine, we’d see this problem when the material wasn’t held down rigid to the deck. (How do you keep you material from shifting?)
From your test photos the problem appears different, and in a different location, each time. So I’d discount it being a file or software problem.
However, on my actual K40 machine I saw a problem where the belt clamp was mounted to the carriage. One screw was loose and the other screw had been Super-Glued after they stripped the thread during manufacture. So I tapped the two holes to a larger screw and it’s solid now. (The two screws in the photo center).
Also be sure you don’t have some debris on the belt that is causing it to “bump”. But I’d discount that possibility.
Have you checked the four carriage rollers? When properly adjusted the carriage sould be snug. If one roller is slightly loose, the carriage will wobble. But this will appear more random.
The K40 machine is not necessarily a bad design, but is is horrible manufacture. So there’s a lot of mechanical problems due to mis-drilled holes, wrong or stripped screws, metal burrs, and un-square cuts.