I was having the same issue! but I figured it out, you have to add a "wait to return" to make sure the pythonista code finishes running before the shortcut does. Hopefully it was the same issue if you haven't figured It out yet.