Detect if MacOS App Running

From time to time I’ve noticed that the MacOS companion app has stopped working. If it fails hard I usually get an OS error report screen, but other times it seems to have stopped responding.

This causes me issues sometimes as then automations based on sensors coming from my Mac don’t work - for example the busy light outside my office door won’t come on when my mic/camera are in use.

I’m looking for suggestions on ways to have some kind of alert in Home Assistant if the app isn’t running (perhaps a sensor hasn’t been update in x minutes?) but not sure what the best approach would be so appreciate any advice.