More doctors are using antipsychotic and anti-addiction injections that stay in the body for weeks or longer, drugs with mixed efficacy records and big price tags that are bolstering the bottom lines of manufacturers.

Many patients being treated for mental-health problems or addiction missed appointments and stopped regularly taking medications during the pandemic. Long-acting drugs are helping to stabilize many thousands of them for weeks or months, doctors said, reducing the risk of relapse or psychotic episodes that could require hospitalization.

Patrick Chadwick said the monthly shots he takes to stabilize bipolar disorder are easier to manage than daily pills and make it easier to maintain routines he values, like seeing his children.

“Last time I was in the hospital, it put me back two months,” Mr. Chadwick, 38 years old, said as he rolled up his sleeve for his monthly antipsychotic shot at Tri-State Pharmaceutical, a pharmacy in Brick Township, N.J.

The injections cost $1,000 to $5,000 a dose, compared with $5 to $10 a month for the largely generic pill versions of similar drugs, according to Mizuho analyst Vamil Divan. Many patients taking the drugs are covered by Medicaid and Medicare, government-funded health-insurance programs for the poor and elderly.

A long-acting injectable drug is prepared at Tri-State Pharmaceutical in New Jersey. Brand-name antipsychotic injectables generated $3.8 billion in U.S. sales last year.

In some cases, the long-acting formulations have helped drugmakers offset declining sales of older drugs that have gone generic. Dublin-based Alkermes PLC makes Vivitrol, a once-a-month injection of the drug naltrexone, which blocks the effects of alcohol and opioids like fentanyl. Naltrexone has been available as a pill since 1984.

“One of the inherent features of the disease is an inability or unwillingness to take your medications every day,” said Richard Pops, Alkermes’s chairman and chief executive officer.

Brand-name antipsychotic injectables generated $3.8 billion in U.S. sales last year, up 7% from 2020 and 83% from 2016, according to a Wall Street Journal tally of corporate financial filings. Including branded and generic drugs, 2.9 million prescriptions for long-acting injectable antipsychotics, such as for schizophrenia, were dispensed last year, up 3% from 2020 and 28% from 2017, according to an analysis by Dr. Divan of Mizuho of data from health-tech and data provider IQVIA Holdings Inc.

The market for pills remains far larger than the market for long-acting injectables, with about 68 million oral prescriptions for antipsychotics last year, according to Dr. Divan’s IQVIA data analysis.

Evidence comparing the benefits of the injectable drugs to pills is mixed. Long-acting injectables were associated with a lower risk of hospitalization or relapse in the majority of more than 137 studies comparing the treatments, according to an analysis published in the journal Lancet Psychiatry last year. More than three-quarters of the studies found, however, that injectables didn’t have a better effect than pills on outcomes including quality of life and cognitive function. Other studies that weren’t included in the meta-analysis have found no advantage for long-acting formulations.

Tri-State Pharmaceutical’s long-lasting injections for substance-use disorders and mental illness was up to about 375 scheduled for May from 152 in February 2020.

Some patients are resistant to having medication in their bodies for long periods, healthcare providers said. “That loss of control can be a barrier,” said Erin Walczykowski, a mental-health nurse practitioner at MBI Health Services in Washington, D.C.

But for patients who don’t take pills regularly or for whom other treatments haven’t worked, doctors said the shots can be useful. Patients are often prescribed the drugs after stopping their medications and suffering relapses that landed them in the hospital, said Jason Hershberger, chairman of psychiatry at One Brooklyn Health, a nonprofit hospital system. Getting the drugs covered by insurers can be time-consuming for hospital staffers, he said.

“From a public-health perspective it creates a disincentive for doctors and health systems to use this technology to its fullest,” Dr. Hershberger said.

Tri-State Pharmaceutical worked with other healthcare providers during the pandemic to find patients who had fallen out of their regular care schedules. Some patients couldn’t find transportation during pandemic shutdowns or were part of treatment programs that stopped meeting in person.

“By the time we were able to get some of these people, they were so far from baseline,” said Nate Cohen, Tri-State’s director of pharmacy. Tri-State has more than doubled the number of long-lasting injections for substance-use disorders and mental illness that it is giving out each month to about 375 scheduled for May from 152 in February 2020.

Joseph LoDrago says receiving a long-acting injectable medication ‘takes the guesswork out of it.’

Some jails and prisons are injecting patients with long-acting anti-addiction drugs before release, aiming to curb overdose deaths among people who have been incarcerated. An estimated 65% of the U.S. prison population has substance-use disorder, according to the National Institute on Drug Abuse.

The Middlesex County Sheriff’s Office in Massachusetts said about 98% of participants who received Vivitrol shots through a program that began in 2015 hadn’t overdosed at least six months after release. Their recidivism rate was about 11%, compared with 27% for people in similar circumstances who weren’t in the program.

“It takes the guesswork out of it,” said Joseph LoDrago, 31, who started taking Vivitrol in 2017 after a series of overdoses and arrests. He took the drug for about nine months, then dropped it for two years without incident, he said. One day during the pandemic, he used opioids and overdosed. Now he is in recovery court and back to taking his shots every month.

“I think some people need that decision taken away,” Mr. LoDrago said.

Write to Julie Wernau at Julie.Wernau@wsj.com and Joseph Walker at joseph.walker@wsj.com