PRESIDENT Donald Trump’s return from three days of hospital treatment for coronavirus disease 2019 (COVID-19) left unanswered questions about his condition and doubts about his willingness to abide by constraints needed to keep a virus outbreak at the White House from worsening.

Ahead of Mr. Trump’s release on Monday evening, his physician, Sean Conley, said that while the president was fit enough to go home, he “may not be entirely out of the woods” and that further care would be provided at the White House over coming days.

Within hours of Mr. Trump’s arrival at the White House, officials announced measures including restricting access to the president and offering protective gear to those who meet with him. The steps seek to prevent further infections following positive coronavirus tests among several key aides, including Press Secretary Kayleigh McEnany.

Yet upon his return from Walter Reed National Military Medical Center, Mr. Trump showed little eagerness to embrace those measures. After descending from presidential helicopter, he walked up the South Portico stairs to the White House balcony, where he removed his mask, flashed thumbs-up with both hands and saluted for several seconds.

He did not appear to put his mask back on before walking into the residence. The show of defiance toward both the virus and public health measures to combat its spread was in keeping with the president’s tone earlier when he announced he would leave the Bethesda, Maryland, hospital.

In a video released shortly afterward, Mr. Trump sought to play down the peril of a virus that has killed more than 210,000 Americans since February.

“I knew there’s danger to it. But I had to do it. I stood out front. I led. Nobody that’s a leader would not do what I did. I know there’s a risk. I know there’s a danger. But that’s O.K. And now I’m better. Maybe I’m immune, I don’t know,” he said.

With less than a month until Election Day, Mr. Trump’s hospitalization has jolted the presidential campaign, forcing him to scrap rallies and other events as polls show him trailing Joe Biden nationally and in swing states. His campaign has launched “Operation MAGA,” referring to his Make America Great Again slogan, to flood the campaign trail with top surrogates like Vice President Mike Pence, Mr. Trump’s family and others.

His most ardent supporters sought to turn his stay at Walter Reed into a sign of strength. Erin Perrine, a spokeswoman for his re-election campaign, said in a Fox News interview that Trump “has experience as commander-in-chief, he has experience as a businessman, and he has experience now fighting the coronavirus as an individual.”

Among the aides who were with the president Monday evening as he was preparing to leave Max Miller, the deputy campaign manager for presidential operations, and Bobby Peede, the White House director of advance. They arrived at the hospital just before 3 p.m., heading to presidential suite.

Mr. Peede had the coronavirus earlier this year, according to three people familiar with the matter.

The White House is creating additional room for Mr. Trump to work in the residence, and avoid heading into the Oval Office, by converting the Map Room and Diplomatic Reception Room into office space, according to a person familiar with the matter.​

​The president’s aides hope to keep him at the residence and away from the Oval Office but are uncertain how long that will last, according to people familiar with the matter.

“We’ll be back on the campaign trail soon!!!” Mr. Trump tweeted before leaving the hospital.

In a briefing hours before the president left Walter Reed, Mr. Conley said coronavirus patients can stop shedding the virus in as few as five days after diagnosis, and that Mr. Trump would be monitored to determine when he is no longer infectious.

“He’s returning to a facility, the White House medical unit, that’s staffed 24-7,” Mr. Conley said. “Every day a patient stays in the hospital unnecessarily is a risk to themselves.”

The president received a fourth dose of an antiviral drug, Remdesivir, at Walter Reed before he was discharged and will get a fifth dose at the White House, his medical team said.

Mr. Conley conceded that the course of Trump’s illness could still take a turn. “We all remain cautiously optimistic and on guard because we’re in a bit of uncharted territory when it comes to a patient that received the therapies he has so early in the course,” he said.

“We’re looking to this weekend,” he added. “If we can get through to Monday with him remaining the same or improving, better yet, then we will all take that final deep sigh of relief.”

The president has received medical care unavailable to most people, including three powerful medicines and an airlift to and from the hospital. The virus has infected more than 7.4 million Americans, according to data compiled by Bloomberg.

Mr. Trump was administered doses of two other medicines, including an experimental “antibody cocktail” and a steroid, dexamethasone, usually used to combat inflammation in people with more severe cases of COVID-19. — Bloomberg