Reset open document, or script "go back"?

I have a template that takes the clipboard contents and creates a new markdown file. My use case for this is taking the results of a “summarize highlights” command and cutting quotes, then creating new files with this template from the clipboard contents. However, this template script leaves DT3 showing the newly created markdown file. Resurrecting an old post from many years ago, I’d like the template script to leave me viewing the “summarize highlights” document instead of the newly created file.

I can think of two ways to do this, but not sure how to AppleScript either method:

  1. The file name of the file I want to be viewing will always end with “Summary.md”
  2. The “go back” arrow in the document preview pane will take me back to the summary document. Can I script the “go back” command somehow?

This would require user interface scripting. You could also try to set the selection of the frontmost window.