Ideas to trigger Continuity Camera (Import from iPhone)

When I try to trigger Continuity Camera from an AppleScript ( using simulated keystrokes ) the camera activates, and I'm able to take a photo on my iPhone, but it never shows up on my Mac. When I do the same keystrokes using the actual keyboard, it works, and the photo shows up on my Mac. Any ideas how I can debug why the photo does not show up when using the script, or any ideas on a better approach to use Continuity Camera? Thanks

tell application "Finder" to activate

delay 7

-- deselect any selections
tell application "System Events" to keystroke "a" using { command down , option down }

delay 0.5

-- Alfred action to open the 'right click' context menu in Finder
tell application "System Events" to keystroke "r" using { command down , shift down }

delay 2.5

-- selects 'Import from phone' menu item
tell application "System Events" to keystroke "i"

delay 2.5

-- 'Enter' to select submenu
tell application "System Events" to key code 76

delay 2.5

-- 'Enter' to select 'Take Photo'
tell application "System Events" to key code 76