Russian sovereign bonds have staged a comeback this summer as investment banks have warmed up to trading the Kremlin’s debt again and investors outside the grip of Western sanctions on Moscow are buying bonds.

The run-up in prices reflects how Russia has maintained investor confidence in some pockets of the world and appears to be managing its economy amid the war with Ukraine. Some government bonds that were marked as low as 8 cents on the dollar in June rallied as high as 50 cents on the dollar this month and now trade at around 45 cents, according to credit analytics provider Advantage Data Inc.

The rally is providing relief for asset managers with exposure to Russia, who may be able to divest assets without incurring too steep of a loss. While many Western investors sold their holdings of Russian debt after the war began, some have held on to their investments.

Newport Beach, Calif.-based asset manager Pacific Investment Management Co. reported holdings of $900 million in Russian foreign currency sovereign bonds through its global income fund as of the end of the second quarter, according to public filings.

Pimco is also one of the largest providers of protection to investors against a Russian debt default, betting on the Kremlin’s creditworthiness through its holdings of credit-default swaps. Pimco purchased additional bonds last quarter before sanctions on buying debt were put in place after selling some of its swaps, people familiar with the matter said.

As investors in the U.S. and Europe pared back their exposure to Russia this spring, bond prices dropped from around 100 cents on the dollar to near 10 cents in mid-March. Subsequent sanctions later blocked the Kremlin from making payments to investors in the U.S., pushing Russia to default on its foreign currency debts in June.

Because of the Kremlin’s repeated efforts to service its debts despite sanctions, some non-Western investors now appear confident Russia will keep honoring debt obligations to creditors who aren’t prohibited from receiving payments, said Timothy Ash, senior sovereign strategist at BlueBay Asset Management in London.

While U.S. investors like Pimco are currently prohibited from buying Russian debt, Mr. Ash said investors who aren’t blocked by U.S. or European sanctions have primarily been driving the bond-price rally.

“The bid is mostly coming from Middle Eastern and Russian investors, who seem confident that Russia will continue to pay them on time,” Mr. Ash said.

Additionally, buying and selling Russian debt is now easier as banks including JPMorgan Chase & Co., BofA Securities and Citigroup Inc. have all relaunched trading after receiving updated guidance from the U.S. Treasury on bond trading restrictions in July, according to people familiar with the matter. JPMorgan, BofA and Citi

declined to comment.

Investors who aren’t restricted by sanctions may also be encouraged by the recent strength of Russian fiscal policy. Sales of oil and gas have bolstered the Kremlin’s finances, helping the government’s tax receipts grow in the first half of 2022 by 32% compared with last year, although Russia’s central bank estimates the domestic economy will shrink over the next two years.

Economists warn, however, that the windfall brought by high energy prices may be short-lived. The recovery in bond prices is “partly a return from the overshooting of the first weeks of the war, similar to the exchange rate of the ruble,” said Iikka Korhonen, head of research at the Bank of Finland Institute for Emerging Economies.

The ruble devalued by nearly 100% after the war with Ukraine began before ultimately recouping its losses, and is now worth more than it was before the invasion began.

However, given the recent strength of the ruble compared with the dollar, Russia is earning less in rubles from oil sales and collecting less in taxes, Mr. Korhonen said. Preliminary signs show tax revenues from oil-and-gas production, as well as export tariffs on oil-and-gas products, fell for the first time this year in July, he added.

“Paradoxically, now the strong ruble works against the government’s finances,” Mr. Korhonen said.

Overall, Russia’s foreign exchange reserves have dropped some $75 billion since the war with Ukraine began, according to central bank data. Capital controls and a boost in commodity prices have helped the government avoid depleting its stock of available foreign reserves, analysts said.

Investors estimate that there is around $100 million in Russian sovereign bonds trading hands daily since several investment banks restarted trading in July, compared with around $500 million daily this spring when Western investors sought to divest Russian assets.

Write to Alexander Saeedy at alexander.saeedy@wsj.com