Few Republicans have been willing to distance themselves from the president as the war’s end remains uncertain.