for those who still haven't find any solution for this, and problems like that, here's what I've done.
you can simply simulate the CLICK trigger which deactivates the activated task, or whatever.
use dojo query to target the activated element, then .click() on it.
measurementActiveButton = dojo.query(".esriMeasurement .esriButton.esriButtonChecked .dijitButtonNode")[0]
if(measurementActiveButton){
measurementActiveButton.click();
}
hope you find it helpful.
cheers developers