Modal dialogs should never be used.
With the introduction of resumable subs there are much better options.
Modal dialogs (B4A Msgbox or DoEvents for example) hold the main thread until the dialog is closed. It is done by processing the message queue internally. In the old days of Android, the system was simple enough and it mostly worked fine. As Android evolved it became very problematic and is likely to cause your app to crash in some cases.
Even if it ran perfectly, the fact that the message queue is processed in an unexpected point has all kinds of bad side effects.