The following KQL query can be used in Azure Resource Graph Explorer to identify alert rules that have an invalid scope:
resources
| where type =~ 'microsoft.insights/metricAlerts' or type =~ 'microsoft.insights/scheduledQueryRules'
| extend scopes = properties.scopes
| mv-expand scopes
| project name, resourceGroup, subscriptionId, location, properties, scopeId = toupper(tostring(scopes))
| join kind=leftouter (
resources