Which attempt are you talking about. The 3 times the British empire invaded, the three times the Soviet Union invaded or the latest Nato-American invasion.
(Historically there was the Sikh, Mugal, Muslim invasions too, etc. etc.)
Possibly the locals got a poor view of western "civilization" by being on the wrong end of its armies multiple times.
Strangely, I agree with your general point, but possibly from the opposite direction.
For example, when Finland was doing its equivalent of the New Deal, I find it unlikely there were any Finn's that would try to use that as political leverage to delay anti-lynching laws and vice-versa.
Racists seem to be one of the most corrosively self-defeating forces in human society.
Its hard to pretend Afghanis' view of "civilization" was formed by the British "invasion" which was not permanent
I think someone invading you (3 times) is highly likely to give you an opinion about them and their ideals, even if they fail, but maybe the Afghanis are a bit more "forgive and forget" than most.
Homelessness may be a solved problem in Norway, but it does not mean that Norwegian solution is readily transplantable into San Francisco. Much like we failed to transplant modern way of life to Afghanistan.