President Biden just signed a bill that could ban President Biden from using TikTok. But Mr. Biden plans to keep using TikTok until Mr. Biden’s new law forces Mr. Biden off it.

His political team in Wilmington, Del., after all, considers TikTok a vital tool to reach young voters who could be crucial to his chances of winning re-election this fall. The problem is that his national security team in Washington considers the Chinese-owned social media site a threat to America that should be banned if it is not sold.

Reconciling those two imperatives left Mr. Biden’s government and campaign advisers laboring on Wednesday to explain the competing rationales. But it is not the only time that Campaign Joe and Foreign Policy Joe have been at odds in recent months. Campaign Joe tells stories on the trail that Foreign Policy Joe’s staff then has to clean up — or try to ignore as best as possible. Campaign Joe prefers blunt talk. Foreign Policy Joe has to worry about diplomacy.

The disconnect is hardly unprecedented in an election year. Every president seeking a second term finds himself juggling two different jobs with two different imperatives at the same time: running the country and running for office. A candidate is focused on firing up supporters and tearing down the other side. A commander in chief has to worry about what might be best for the nation even if it is not necessarily best for his electoral chances.

Still, the disparity between Wilmington and Washington has been on display lately. When former President Donald J. Trump hosted Prime Minister Viktor Orban of Hungary at Mar-a-Lago, Mr. Trump’s Florida estate and club, Mr. Biden’s Delaware-based campaign assailed Mr. Orban as “a dictator.” The White House, however, refused to use that term for a NATO ally.

Just last week, Mr. Biden told two campaign audiences that after being shot down during World War II, his uncle might have been eaten by cannibals in Papua New Guinea. Unsurprisingly, that rather peeved the island nation’s leaders at a time when the president has been courting them as part of his Indo-Pacific strategy.