I don't think you read the article or the links you provided. It clearly states the police are obtaining this information through subpoena and not warrants:
In briefings, officials with America’s eight biggest pharmacy giants — Walgreens Boots Alliance, CVS, Walmart, Rite Aid, Kroger, Cigna, Optum Rx and Amazon Pharmacy — told congressional investigators that they required only a subpoena, not a warrant, to share the records.
And in the link you provided:
When might it be permitted for a pharmacy to disclose PHI to law enforcement officers?
Bearing in mind that, once in a designated record set, PHI could be an individual´s name or physical description, a pharmacy (or pharmacy staff) is permitted to – but not required to – disclose PHI to law enforcement officers in the following six circumstances:
as required by law (including court orders, court-ordered warrants, subpoenas) and administrative requests
In this case, the leeway in the standard here is what the pharmacy chooses to comply with. They are choosing to comply with subpoenas. This article points out how that standard could be higher (warrants).
You keep dropping links for me to chase instead of just reading between the lines. Police cannot issue their own subpoenas. Police are not judicial officers. However, they are getting judicial officers to write their subpoenas. A judicial officer does not have to be a judge, therefore the standard is lower than a warrant.
The police are breaking federal law and the article is wrong. This is not a gray area.