It doesn’t matter if the Custom HTML Prompt is running asynchronously or not - other macros can still be executed regardless.
But I did work around it, and you can use that fact using the KeyboardMaestro.ProcessAppleScript, to have it run the macro, wait for it to complete, and return the value. Probably the easiest will be something like:
window.KeyboardMaestro.SetVariable( "Search", searchstring );
window.KeyboardMaestro.ProcessAppleScript( "tell application \"Keyboard Maestro Engine\" to do script \"Macro Name or UUID\" " );
var result = window.KeyboardMaestro.GetVariable( "Result" );
You could read the variable result in the AppleScript and return it from ProcessAppleScript, but it doesn’t make it any easier or clearer.
Basically you are just using the ProcessAppleScript synchronous properties, together with the
do script synchronous properties.
Note that you may need to use AppleScript’s facilities to turn off timing out waiting for the result if the macro will take a significant amount of time to run.