I’ve asked my local Costco about returning a trial hearing aid if the company comes out with an updated model within the trial period, and I’ve been told that yes, you could “swap” the older version within the trial period. But it’s not quite a “swap”; you’d return your current hearing aids, get your refund, and then purchase the new 9050 hearing aids. The process would be no different than if within the 6 month trial period you decided you didn’t like your current Philips 9040 HAs, and decided you wanted to return them and get, say, the Rextons instead.
One thing to be aware of is that at least some Costco stores may have a (unwritten?) policy of only allow three returns of trialed hearing aids before cutting the customer off and refusing to sell them new hearing aids. This is just something that I’ve picked up reading this forum. I can’t speak to this from personal experience, and I’ll leave it to others who have more knowledge to confirm whether or not this might be a concern.