Export in CLI with another active instance of Godot

Godot Version

Godot 4.2.1

Question

Hello! I’d like to make a script that will export a debug version of my application every time I execute it, so I could compile it faster rather than clicking 3 buttons to export in graphics. But when I launch the script with a running graphical instance of godot, the CLI version crashes. If I do it without running Godot, it’s completely well. Is there any way to solve this issue? Or there are any easier ways to fast export the project? Thank you!!