Do you have limit switches, especially on your Z axis?
I had similar “seemingly random” issues like this in the past and upon close inspection discovered it was usually that I got to the bottom of the physical Z down travel even though I hadn’t reached the target depth in the file.
In a situation like this, with the machine on and cutting, you likely won’t hear it bottom out and grind for the few extra MM of travel. Especially if you have your hearing protection on.
You could check for this by halting the job, powering off the router (!), and then looking at the read out on UGS to see where it thinks the current machine and workspace Z heights. Take a screen cap on your phone so you have both.
Then take a small ruler and measure where the end of the bit is relative to the table top and workpiece top. If you can’t align the numbers (sorry the logic escapes me but will likely be obvious to you in context) then your Z is out and you bottomed out.
If it is weird, the machine thinks it is at a certain depth in the gcode but it is physically at a different depth. This can cause all kinds of strange things to happen (and can happen if you hit the top of your Z travel on the upside too).
Looking at your picture, that looks like 3/4" baltic birch or maybe 1". I don’t know hw deep your pocket is but it looks like it blew through the side at about 15mm or 16mm. So if you had a nunber like that show up in your Z offset that is likely it.
Another sanity check - if you measure the depth of your pocket with your caliper, is it correct compared to your drawing or is it deeper or shallower? If it is materially off, your Z is probably out.
It may not be this, but something to be aware of. Limit switches are a must, in my opinion. Z up is easy, Z down was trickier to sort out. But having the job pause and throw an alarm if you over run your Z axis will save a lot of time.
Not sure what CAM software you used, but I did have this particular thing happen early on with Fusion 360. I -think- the answer was to always turn on “stock contours” in the setup menu for the toolpath. That tells the toolpath to keep it’s travel at cutting height constrained to the workpiece and otherwise retract. Without doing this (and my memory is a bit fuzzy) but I believe I had it treat the “waste” stock as far game for transiting across - sometimes at a great distance, before starting or ending a job. Haven’t had it happen in months but I always check stock contours and double check the simulations (although this may not show up in the simulation and still happen, IIRC).
That being said, I didn’t have limit sensors then and I think I sometimes had two or more compounded problems so take this one with a grain of salt.