Naomi Freundlich, a Brooklyn writer, had been buying the generic version of Adderall XR for two years to treat her son’s attention-deficit hyperactivity disorder. Her family had a $3,000 annual deductible, and the relatively lower price helped keep medical costs down.

Then, in 2014, her pharmacist told her that her insurance plan would cover only the brand-name drug, which cost her family some $50 more a month than the generic. If she paid for the generic herself, it would not have counted toward her deductible. Ms. Freundlich complained to her insurer, UnitedHealthcare, but could not get a clear answer.

“It’s hard to explain because it doesn’t really make sense,” she said.

UnitedHealthcare has continued to favor Adderall XR and certain other brand-name drugs over generics, according to claims provided by independent pharmacists and reviewed by ProPublica and The Times. The insurer also recently told health providers that it preferred Remicade, the expensive rheumatoid arthritis drug made by Johnson & Johnson, over biosimilars that have a lower list price and are just beginning to come on the market.

A spokesman for UnitedHealthcare, Matthew N. Wiggin, said the insurer does at times prefer brand-name drugs. “By providing access to these drugs at a lower cost, we are able to improve affordability for our customers and members,” he said in an email.

Asked whether consumers sometimes ended up paying more because of these choices, he said pharmacies and doctors could seek an exemption from the insurer if they wanted the generic instead. Several patients said they had not been told of that option.

Shire, the maker of Adderall XR, and some other brand-name drug manufacturers are no longer content to allow sales of their products to plummet when generic competitors arrive on the market. Instead, they are negotiating deals with insurers and pharmacy benefit managers to give priority to their versions. Consumers are given no details about these deals.

A Shire spokeswoman said the company had been able to hold on to market share for Adderall XR by offering insurers and government programs prices that are competitive with those of generic manufacturers.