Unfair, eBay refunding buyer

I sold one of my personalised hearts which was lost in the post.

The buyer messaged me about this & I arranged to send out a replacement but then they opened up a case with eBay before the replacement arrived!!

After a couple of days eBay refunded her, so she got a free item which has now cost me 2 lots of postage & the cost of two of my items.

How is this ok ?

Feel like I’ve been scammed