It looks like the ProcessAppleScript cannot be used to control Keyboard Maestro Engine itself. I'm not really sure why, the error message is not particularly helpful. It may be some sort of security restriction. It does not seem to affect the Execute an AppleScript action, so maybe it is related to however the WKWebView is communicating with the Keyboard Maestro Engine which somehow drops the permissions it is allowed.
I'll continue looking, but currently I have no leads on why this is failing.