Yes, apparently you did stump us. I can’t really see how this could be done, and judging by the lack of responses, nobody else can think of a way either.
There is generally no way on the Mac to know where the text selection is.
On a web page, you may be able to determine it and you might be able to map that to a coordinate in the page, which you might be able to map to a coordinate in a window which you could then click on. But I have no idea how to do any of this or even if it is possible.
You might be able to detect the selection with an image capture and clever image processing. But not natively in Keyboard Maestro (well, ok, you could scan through pixels, but it’d take a very very long time - Keyboard Maestro is not the tool for pixel processing!).
Thanks @appleianer - this works for some cases but not all of them. I’d definitely prefer a programmatic solution rather than a visual one because of how dynamic text can be.