Switching off energy decay channels in nanomechanical resonators