His boss, President Joe Biden, is acutely aware of the growing domestic discontent with how he is handling the war, which could cost him votes in next year’s presidential election.