This is sometimes true in the U.S. too, but here the pharmacy/drugstore would almost always be within the main retail space. The “over-the-counter” medicines, toiletries, cosmetics, and pharmacy counter are in the same space. You can pay either at the pharmacy counter or at the main checkout counter. By the way, this is also how most drugstores here are laid out: the pharmacy counter and photo processing counter are both departments within the main retail space.
I think the distinction is a lot blurrier over here, where the store-within-a-store format is very common and supermarkets have grown to encompass services once the domain of department stores. Not long ago, I visited a Costco store to shop for a cell phone. There were some phones in the electronics department, a few steps away from a kiosk selling the same phones but staffed by a third-party vendor. I would’ve had to begin the transaction at the kiosk but pay at the main checkout counter.
There are two Mexican supermarkets in my neighborhood: at one, the taquería is before the checkout counter; at the other, the taquería is just past it. Both are staffed by the supermarket and you can only pay for your meal at that counter. Both have seating right next to the counter. Across town, there’s a Vietnamese supermarket with a bakery counter before checkout that’s part of a chain of standalone bakeries. You can pay for your whole shopping cart at that counter if you want.