Did you route the cable correctly when you changed it? Is the mech hanger straight? Did you also change the cable outer – if so, is it the right stuff?
Sounds like the sort of issue you get when the cable outer is compressing when under tension, like it does when some dim wit(*) with a disorganised spares box uses brake outer instead of gear outer, and is too thick / blind to notice.
*, er, ‘a friend of mine’