When a gas station buys a batch a gasoline, they have to price it based on what they paid for that batch. When they buy a new lower priced batch, then they can start lowering the price based on the new batch cost.
When gas prices are in a downward trend, the gas stations that go through more volume can drop their prices sooner, because they buy the cheaper batches sooner. The more price drop, the bigger the difference will be between the large volume stations and the smaller ones. When the prices level off, the difference becomes much smaller.
OTOH, when prices are in an upward trend, the smaller gas stations can keep the lower prices for longer than the large volume ones.
Because Costco sells a much higher volume than just about anyone else, they go through their supply and purchase another load quicker than anyone else. When the prices start going back up, Costco will not have much of a price advantage, if any, over the smaller stations. In fact, I have often seen Costco more expensive than the small stations in the upward trend.