This is more of a documentation issue.
Monitor calls the script, waits for it to complete. If the script itself requires the monitor to do something, it cannot complete. There is no real universal solution unless the monitor does not wait for the script to complete. The script can be written such that it completes in the background.