QGC Custom Build Instance keeps running

I’m currently building a custom version of QGC for desktop. I packaged my custom build into an installer, and then installed the executable. My issue is that when i close the executable it keeps running in the background. On clicking the app again, i get the error “an instance is already running”. The only way around it is to kill the app in task manager. I figured its probably because of a memory leak somewhere in the app, has anyone had this issue or solved it?