You cannot, the only way is to capture the warnings and backoff for a while. Here's a script/module that shows you how to handle this: https://github.com/Canthv0/RobustCloudCommand/blob/master/RobustCloudCommand.psm1
As for other methods, I'm afraid you're stuck with PowerShell. You can try some of the newer cmdlets such as Get-MailDetailATPReport:
Get-MailDetailATPReport -EventType "Message passed" -StartDate "01 May 2021" -EndDate "15 May 2021" -PageSize 5 -DataSource RealtimePipeline -Direction inbound | fl