Maybe change the launchd script to run the app directly. There are options to keep the app running.
shscript running as daemon which controls [an]
Running as a daemon? Or running as an agent?
The former is going to be problematic because daemons run in a global context and apps run within a GUI login session. Creating a daemon that reaches up out of its global context into a GUI login session generally doesn’t end well. To start, you have to answer the question “Which GUI login session?” because there can be more than one.
Before continuing I recommend that you read Technote 2083 Daemons and Agents. It’s old, and a little crufty, but it’s core explanation of the macOS architecture is still valid, and you need to understand that if you’re going to make any progress here.
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"