Deep linking finds incorrect application

I do a lot of development on a couple of Electron applications. I am doing deep linking on only one of those. However, when open the deeplinking URL it sometimes will open the wrong electron application? And sometimes is runs electron from node_modules in my development repo? Is there something I can do when I register the protocol to prevent this? After installing my app (built through Electron builder) I often have to run the app manually in order to get the correct application opened.
This is running on macOS Mojave. with Electron 5.x
Here is the entry from package.json

"protocols": [
    "name": "examid",
    "role": "Viewer",
    "schemes": [