That is the anti-cheat doing its job, and the fix is to stop injecting.
Modern Call of Duty titles run server-side detection, and the pattern you are describing — the tool closing itself the moment matchmaking starts — is the client being identified and terminated before it can do anything. There is no configuration change that gets around it.
Continuing also risks a permanent account ban, and injected tools are a leading source of stolen credentials, since the binary has full access to your machine.
If the real issue is performance or difficulty, those have legitimate fixes: update your GPU drivers, lower a few settings, and spend time in private matches learning recoil patterns.