Were you running a shopvac during that job which got interrupted, and maybe vacuuming manually (you don’t use a dust shoe from what I can see in the pic) ?
A few common tips to mitigae disconnects are here, but I would start with checking the grounding of the machine, there is an excellent thread (and video) from @LiamN here: