Stop image upload if moderation fails using EVENT_BEFORE_HANDLE_FILE
From investigating, the issue could not be resolved at the time of writing this answer. Even though the EVENT_BEFORE_HANDLE_FILE on the Asset class extends the cancelable event, there was not actually a way to cancel.
To answer the question, there is currently no nice way of being able to cancel this event.
I raised a ticket to add this feature, you can follow its progress here https://github.com/craftcms/cms/issues/6875
This would allow you to use $event-&gt;isValid = false; in the scenario any tests fail and you didn't want the image to continue being handled by Craft.