WASHINGTON — After being rebuked by President Trump for racking up at least $400,000 in travel on chartered flights, Health and Human Services Secretary Tom Price said on Thursday that he would pay back taxpayers for his part of the bill and stop flying on private jets.

But that does not mean his job is safe.

Mr. Trump has grown incensed by Mr. Price’s liberal renting of expensive planes, which he views as undercutting his drain-the-swamp campaign message, according to several administration officials with direct knowledge of the president’s thinking. Through intermediaries and the media, Mr. Trump has let it be known that offering reimbursement as repentance was no guarantee that Mr. Price would keep his job.

On Thursday, Mr. Price tried anyway.

“I look forward to gaining, regaining the trust that the American people, some of the American people, may have lost in the activities that I took,” Mr. Price said in an appearance on “Special Report with Bret Baier” on Fox News.

Mr. Price called Mr. Trump “a remarkable leader,” and said the president had expressed displeasure to him “very clearly.”