Detach the wxProcess from the chain before closing Fixes https://gitlab.com/kicad/code/kicad/-/issues/16608