I recall a US commander in Afghanistan saying more or less explicitly that they were doing that - his rationale was that whatever military objectives they were given would be unachievable if Congress pulled them out, therefore the highest priority was always implicitly the preservation of goodwill via e.g. avoiding excessive casualties. Feels back-to-front to me, but maybe it worked for him.