The mistake was supporting a Constitution that was explicitly Islamic. After that became the law of the land that was the time to go.
The mistake was thinking we had any interest other than paying back the Taliban and ISIS for 9/11 through aerial bombardment of any and every culprit we could find.
Then we should have gone home, oh and demanded compensation from and retribution against the Suadi’s who thought funding this nonsense would be fun and games for the kiddies. But that’s just maintaining a strong deterrence policy.
Think about it. Does any third rate international punk mess with Putin?
The mistake was not killing everyone and salting their fields.