I just tried a simple example on my machine, published to scorm cloud, and received the messages. I placed a break point in the listener and it indeed received the clicked message.
In my Lectora title, I have an external html object set to “header script” with your code. I also created a WebWindow set to point to “Local Web Based Content”. I downloaded an html5 publish from Cenario VR, extracted the zip into a directory, and I pointed the WebWindow to the index.html in that directory. I also checked the “Include all files and sub folders” checkbox. published to scorm, imported to scorm cloud, and launched.
Is that similar to what you did?