I wrote a blog "Create an e-mail alert/sms when someone logging into an Azure Windows Virtual Machine
You can try the same steps with a change in the query something like below:
AzureActivity
| where OperationName == "Deallocate Virtual Machine" and ActivityStatus == "Succeeded"
| where TimeGenerated > ago(5m)
The query looks the activity Log for Server Shutdown events in every 5 min. and sends an email alert if found!
Hope it helps!
--please don't forget to upvote
and Accept as answer
if the reply is helpful--