Please define ‘new’ as that terms more ambiguous than you may assume.Meanwhile, the first paragraph makes it sound like you’re making a new note by blind-pasting data into Tinderbox (note: thit implies you should (must!) have focus explicitly in the view pane. The second paragraph implies you’re then using View -> Text window to open a tear-off text window on the new note. Without an exact set of steps to test, I’d do all the steps in your script manually first. If that works but the KM macro fails look at the focus at input and timing (delay?) between steps. It may be that, v6 notwithstanding, that you’re macro is trying to open text window on a note not yet fully created. In that case, a new (incomplete) note would lose focus and thus be deleted.
I’ve tried a blind paste Cmd+V (paste) and Cmd+Opt+X (open tear-off text window) and I get a new window (v7.0.3). That would re-inforce the above that you probably want to step iteratively through your macro and find where it breaks. it may be you need to add an explicit Return keystroke to close out the note creation or insert a delay before calling the new text window.