Stay Tuned for a Trump Split Screen Featuring Cohen and Kim

Other current and former White House officials said they saw a silver lining: The president tends to spend less time on Twitter when he is busy overseas, where he is less consumed by any developments pertaining to the open investigations. Mr. Cohen’s testimony, which might have had Mr. Trump glued to his television in the dining room off the Oval Office if he were home, they said, could pack less punch if he is busy with Mr. Kim.

Still, even people who are not natural supporters of Mr. Trump said the timing of Mr. Cohen’s hearing was unfortunate, whether it was avoidable or not. “It’s not a desirable thing that the president goes abroad and, while he’s having an international summit, his former lawyer is testifying about the alleged crimes he’s committed,” said Benjamin Wittes, the editor in chief of Lawfare, and a friend of Mr. Comey’s.

The pattern, some critics of the president said, is simply a product of the number of investigations involving Mr. Trump, which have overshadowed his work both at home and abroad.

“When your campaign, your transition, your charity, your business, your White House and your inaugural committee are all under investigation, there are going to be a lot of new developments,” said Matthew Miller, a former spokesman for the Obama Justice Department.

For now, the White House is trying to shrug off the overlap.

“I don’t think the president has any concerns whatsoever about Michael Cohen,” Sarah Huckabee Sanders, the White House press secretary, said last week on “Fox & Friends.” “I think Michael Cohen may need to be concerned for himself, but that’s certainly something that’s not influencing or bothering us in this building.”