WASHINGTON — A week ago, President Trump stood before Congress as an improbable unifier. “Tonight,” he declared, “I call upon all of us to set aside our differences, to seek out common ground and to summon the unity we need to deliver for the people.”

This week, Mr. Trump is back to being a disrupter. After accusing Democrats of being un-American and even treasonous for refusing to applaud during his State of the Union speech, he said on Tuesday that he would welcome a government shutdown if he cannot reach a spending deal with Congress that tightens immigration laws.

A week ago, Mr. Trump called for a grand compromise with Democrats on the legal status of the undocumented immigrants known as Dreamers — a deal, he said, “where nobody gets everything they want, but where our country gets the critical reforms it needs.” After all, the president added, “Americans are dreamers too.”

On Tuesday, his chief of staff, John F. Kelly, said that many Dreamers failed to register for protected status with the government because they were “were too afraid to sign up” or were “too lazy to get off their asses.” He said he doubted Mr. Trump would extend the March 5 deadline that shields them from deportation.