[wasm][debugger] Prevent crash on disconnect of client (#18107)