beforeChange event of checkbox in form does not cancel change with asynchronous function

I have a form with a checkbox, which I implement the beforeChange event to execute a function with asynchronous return. While doing tests, I realized that if the function returns false that it should cancel the checkbox change, it doesn’t work correctly.

If the function is not asynchronous, everything works correctly, but I need it to work this way. Is there any way to make this work, or would it be a problem with the suite’s execution of the event?

Here is an example with the situation I mentioned:
https://snippet.dhtmlx.com/7uzeqw5z