The effect of cellular differentiation on the development of permanent drug resistance