Announcing troop withdrawals will force the United States to rethink long-term military commitments that have little public support and are no longer effective. It could also force the Afghans and Syrians to confront their own deep-rooted problems, without the presence of foreign soldiers who often delay the day of reckoning.

“I, for one, think the decision to withdraw is sound and wise,” said Robert S. Ford, the last American ambassador to Syria.

Keeping 2,000 Special Operations troops in eastern Syria, Mr. Ford said, will not prevent Russia and Iran from exerting influence. It will not stabilize or rebuild the parts of the country once held by Islamic State fighters. And it will do little to end Syria’s six-and-a-half-year civil war. The presence of American troops has not made Mr. Assad any more amenable to a settlement than he was before the campaign against the Islamic State began in 2014.

“Despite holding most of eastern Syria for two years, including the oil-fields, the U.S. and its Syrian allies have extracted exactly zero political concessions from Assad,” said Mr. Ford, who now teaches at Yale and is a senior fellow at the Middle East Institute. “Assad will wait us out.”

The situation is even starker in Afghanistan. Last month, a year after Mr. Trump grudgingly authorized the deployment of nearly 4,000 troops, bringing the total number there to 14,000, the chairman of the Joint Chiefs of Staff, Gen. Joseph F. Dunford Jr., admitted that the Taliban “are not losing.”

“If someone has a better idea than we have right now, which is to support the Afghans and put pressure on the terrorist groups in the region, I’m certainly open to dialogue on that,” General Dunford said at a panel sponsored by The Washington Post earlier this month.

Mr. Trump has ordered the number of troops cut in half, to roughly 7,000, which could be the precursor to a full withdrawal. His decision contributed to the resignation of Mr. Mattis, who told the president he deserved someone whose “views are better aligned with yours on these and other subjects.”