I must have missed your comment back in May!
Unfortunately, the list returned isn't folders recently accessed by Finder, but those recently accessed by DFX, as you'll see if you run this:
DFX - Get Recent Folders.kmmacros (22 KB)
I found another approach to all this on StackExchange. However, the stumbling block continues to be that navigating within an open Finder window doesn't register as a focused window title change, so regardless of the macro, nothing gets triggered. The window title is changing but isn't detected. The issue persists since I upgraded to Monterey, so it's not an OS version thing. Seems like some people aren't seeing that behaviour though, which only makes it more confounding.