WASHINGTON — The Democratic takeover of the House of Representatives was a blessing in disguise for a president who needed a foil, Republicans predicted last November. President Trump, who had only the press and the special counsel to battle with, they said, would find a useful antagonist in Speaker Nancy Pelosi.

It hasn’t exactly turned out that way.

After a series of misadventures, Mr. Trump has conspicuously laid off personal attacks aimed at Ms. Pelosi. Even as the standoff over funding a border wall appears to be finally ending with a deal seen as a defeat for the president, he has blamed unnamed Democrats but not their most prominent leader. And there has been no undermining Trumpian nickname — the president has said his moniker for Ms. Pelosi is, simply, “Nancy.”

Mr. Trump, who once stalked Hillary Clinton, the former Democratic nominee, around the presidential debate stage and continues to encourage “lock her up” chants at his rallies more than two years later, simply gazed up at Ms. Pelosi during his State of the Union address — and then found himself the target of ridicule for the picture of her giving him what appeared to be a dismissive clap of the hands.

“She has a unified Democratic caucus behind her, and she’s not intimidated,” said Representative Katherine M. Clark, Democrat of Massachusetts. “I don’t think that Donald Trump has run into that too often in his life, and he doesn’t know quite what to make of it all.”