The window have been opened from an application after clicking on the 'Choose...' button in the background.
Wonder if you could by default “Sort by date added” then use the down arrow to select the first item? However I am not sure that Finder defaults also carry over to “choose” windows.
I tened to keep certain folders sorted by date added (if you don’t see the date added column you have to control click then add a check mark so it displays). This allows me to have stuff I am working with always show up at the top of the list.
Presuming it is a fixed directory (or you can otherwise get the directory path into a Keyboard Maestro variable), you can use the For Each action with the Folder Contents collection to iterate through the files in a folder. And you can use the Get File Attribute action to get the added date. Its not too hard to then find the one with the biggest added date, and then you’ll have the path to the file.