Soon after his airplane took off from Moscow last fall, a Russian energy official who had just resigned took his phone and typed up the emotions he had kept bottled inside since the invasion of Ukraine.

“I am tired of feeling constant fear for myself, for my loved ones, for the future of my country and of my own,” Arseny Pogosyan wrote on his social media page as he flew into a hurried exile. “I am against this inhumane war.”

The outburst in September did not receive much attention, gathering eight likes and one brief comment. After all, Mr. Pogosyan, 30, was among the hundreds of thousands of young Russian men fleeing the mobilization announced days earlier by President Vladimir V. Putin to replenish his battered military.

But among his colleagues in the energy ministry, where he worked as a press officer, his decision to leave his job was rare.

Since the war began, Russia has lost droves of tech workers as well as other professionals, a brain drain that analysts say will harm the country’s economy for decades. By contrast, many government employees have fallen in line behind Mr. Putin’s wartime leadership. Almost all senior Russian technocrats and a large majority of their immediate subordinates — officials who guide Russia’s economy — remain in their posts more than a year after the invasion.

Their professional expertise has helped Mr. Putin largely keep the economy afloat in the face of increasingly severe Western sanctions.

“It is unthinkable for me these people can support this war, yet they won’t openly condemn it,” Mr. Pogosyan said in an interview in March in Egypt, where he spent three months waiting for a U.S. visa in an apartment by the Red Sea. “It’s the quiet majority. Everything in Russia is built around it.”

Raised after the collapse of the Soviet Union, Mr. Pogosyan represented a new generation of officials climbing the ladders of Russian ministries and state companies. Tasked by Mr. Putin with modernizing the national economy, they built their careers by replacing the Iron Curtain mentality with Western practices in public institutions.

In their personal lives, they navigated Western culture, bonded with Western partners, vacationed in Europe and the United States and often studied there.

Mr. Pogosyan’s former superior, for instance, was a deputy energy minister, Pavel Sorokin, who studied in London and worked at Morgan Stanley. Mr. Sorokin, 37, has played a key role in maintaining Russia’s alliance with the Organization of Petroleum Producing Countries, which has helped prop up the Kremlin’s oil revenues, according to Mr. Pogosyan, who until his departure wrote the deputy minister’s press statements.

Another Russian technocrat, Mr. Putin’s chief economic adviser Maksim Oreshkin, 40, worked in the French bank Crédit Agricole and is fluent in English. He devised a payment system that allows Russia to sell gas to Europe in rubles, pre-empting Western sanctions, Bloomberg News reported last year, citing anonymous sources.

And Aleksei Sazanov, 40, an Oxford-educated deputy finance minister, works on maximizing Russian tax revenues from oil and gas exports hit by sanctions.

Mr. Sorokin and the press offices of Mr. Oreshkin and Mr. Sazanov did not immediately respond to requests for comment on their post-invasion initiatives.

The midlevel technocrats who opted to stay in most cases did not face explicit government threats or coercion, said Aleksandra Propokenko, a former monetary policy adviser at Russia’s Central Bank, who resigned and left the country shortly after the start of the war. Instead, she said, they are driven by a combination of professional opportunities, material benefits and inertia.

Mr. Putin’s calls for economic self-sufficiency have put a premium on their professional skills, Ms. Prokopenko said in an interview in Berlin. “They are becoming more visible to Putin, and they feel empowered.”

She and other analysts, as well as exiled Russian dissidents, cite several reasons most technocrats remain in their jobs. Some support Mr. Putin and accepted his justification for pressing war in Ukraine. Those with misgivings tend to emphasize the value of their work for ordinary Russians, who are suffering the economic consequences of the war.

Some have found comfort in the policy minutiae that allows them to ignore the big picture. Still others have remained because of family commitments, fear of losing privileged Moscow lifestyles or the uncertain outlook facing Russian exiles in the West.

“You can simultaneously understand that a catastrophe is unfolding, and remain inside the system and see opportunities for yourself,” the exiled Russian journalist Farida Rustamova said in a podcast last month.

Until last year, Nick Korzhenevsky, 37, ran an economic data subsidiary at the country’s largest state-owned bank called SberIndex, coordinating a team of 14. He said he had professional autonomy, the respect of superiors and a high salary.

He decided to resign after the start of the invasion, he said, because he believed the economic information that he collected could be used by the Russian government to prosecute the war. He moved to Warsaw last fall.

“I saw personal responsibility in that,” Mr. Korzhenevsky said in an interview. “This belief that one works for the benefit of the people, and not the war, is a very dangerous narrative that gives strength to the system.”

Yet even those who decide to leave can find it difficult to break ties, Ms. Prokopenko said. And these difficulties increase with seniority.

She said the Russian intelligence agents who are traditionally attached to all ministries and major state companies closely monitor personnel moves; they also have the last word on all resignation petitions submitted at managerial level. Since the start of the war, these overseers have worked to convince managers considering resignation to remain in their posts and even forced some to hand over their passports, Ms. Prokopenko said, recounting her conversations with officials.

By dragging out the resignation process, the government can exploit the workers’ attachment to protocol, as well as their fear of damaging their reputation among peers, she added.

“To get up and go is absolutely unthinkable for these people,” she said.

Mr. Pogosyan’s complicated journey to exile illustrates this complex interplay between personal benefit and moral quandary. He remained in his post for months after the start of the invasion, describing how a desire to wait out a period of intense uncertainty gradually morphed into inertia and then acceptance of the new circumstances.

His take-home monthly salary, equivalent to about $4,000, allowed him a comfortable life in Moscow. “My future was secured,” he said.

His previous role focused on boosting Russia’s image as a reliable global energy supplier, he said, but once the war came it shifted primarily to managing domestic public opinion.

In particular, he was instructed to downplay negative news, such as rising energy costs, for the Russian consumer, he said.

“The government was doing everything that it could to make sure that people in Russia would not notice any changes in their lives” after the war, Mr. Pogosyan said.

Kremlin officials began to review the work of his press office, he said, pressing his team into what they saw as an information war against the West. In the summer, he and about 150 other government press officers were sent to a three-day workshop where the Kremlin’s powerful domestic policy chief, Sergei Kiriyenko, called on them to become “information S.W.A.T. teams” in the battle for Russian hearts and minds.

Mr. Pogosyan said the politicization of his work made him uncomfortable but, like everyone else in his team, he carried on with his tasks, convincing himself that it was still removed from the country’s war machine.

This changed after Mr. Putin’s announcement in late September that his military would call up 300,000 men after a series of disastrous setbacks in Ukraine.

Spooked by a rumor that he would soon be mobilized, Mr. Pogosyan swiftly resigned and boarded a flight to Armenia.

In interviews, two people who knew Mr. Pogosyan confirmed the broad details of his departure from his job, and from Russia.

After that social media post last fall condemning the war, Mr. Pogosyan’s former employer considered filing a criminal complaint against him, according to a person familiar with a letter requesting the complaint. And two of his friends received vague phone inquiries about him from men claiming to be police. No criminal case against Mr. Pogosyan was publicly opened.

In Armenia, Mr. Pogosyan contacted the U.S. embassy and applied for a special refugee visa. He eventually crossed overland to neighboring Georgia and later flew to Egypt. Despite being surrounded there by Russian tourists, Mr. Pogosyan said, he kept to his own to avoid coming across government supporters.

Now, he rents a room in Brooklyn and does odd jobs while waiting to apply for political asylum.

Mr. Pogosyan said some have accused him of publicly denouncing the war out of a desire to receive preferential treatment in the U.S. And he does not deny that he only decided to leave once the mobilization put his personal safety at risk.

The key is finding the will to quit, he said, regardless of the circumstances.

“My main goal is to contribute to ending this” conflict, he said.

Alina Lobzina contributed reporting from London.