The differences are small, so yes. The major difference is that medicines are created to treat a specific condition, where recreational drugs are not. (alcohol is a recreational drug when not used as a topical antiseptic.)
However, drug manufacturing processes are often done to do one of 3 things.
1) Control quality of product.
2) Increase production yield of product.
3) Assure safety of product.
Many drugs these days are synthetic; they start with some natural feedstock molecules, then get chemically treated with a variety of processes to add remove functional groups. Those processes can leave bits and pieces of biproduct in the resulting preparation, and those biproducts can be dangerous when consumed. That's one of the big things that big drug corps harp about when it comes to generic versions of namebrand medications. (acetaminophen vs Tylenol, et. al.) This discounds that often the reason for generics using a different synthesis pathway/production process, is because the drug companies are so afraid of competition that they patent their synthesis process as well as the drug itself, forcing the issue. Rather than accepting that they are the ones responsible for the potentially less safe generic medication's reliance on alternative synthesis methods, and ceasing the process pantent bullshit-- they instead go an cry little crocodile tears to governments, asking them to please block out those "dangerous" generic drugs from the market.