A change coming up soon will have it so you can target/sort specifically which items you want to use in a craft so this will not happen. Otherwise, currently, the only way to make your tools safe is to drop them, equip them, or attach them to a quickslot.