The script does not "stop" but because its focus was transferred to the attachment iframe it keeps running inside there. We need to transfer its focus back to the outer root frame for it to continue there.
You can do that by adding {click: selector=td.bzE div[command=docs]; frame=top}{enter}
at the end of the snippet. It's the same command as the first one in the snippet. This will click on the attachment button again.
If you only want to focus back into the email textbox, {click: selector=.editable; frame=top}
should be sufficient. I hope you got the idea. Let me know if it works for you.