If you select another resource, which is not in the mining area, don't they return to the depot? An option to clear the 'recipe' would already be sufficient then (don't know if the drones return instantly and if they carry mined resources back).
Didn't check the kod lately so you would have to test it yourself.