Most front end employees do not know that federal regulations supersede their authority. Politely ask to see a manager.
Pharmacies are regulated by the FDA (for now anyway. Who knows what things will look like a month from now) and pharmacies cannot bar customers from using their services.
Costco pays better than most retailers but they still aren't paid to be lawyers. They are likely not aware of the regulation or even their corporate policies on who gets waved through.
Iirc alcohol are the same, though often controlled at the state level so maybe different between states. Some states have regulations on warehouse memberships not being required for purchases.
The door people are definitely trained about who they should let through to the pharmacy. If someone is blocking you it’s because they have a shitty personal bias and are trying to build artificial hurdles between you and healthcare. Definitely let their manager know so that you can get in and the manager knows they accidentally hired a Nazi sympathizer.