Before you do that consider that it will add extra log ingestion and thus billing. That will work, especially if your process isn't installed as a windows service as the blog Gourav linked to. If you use that counter you could then look for when that process is using 0 amount of processor time.
You could also write a powershell script to collect this information for only select processes and send it to the log analytics api.
as always with log analytics there are multiple options to solve a problem.