I think the attitude to adopt is to add 3% onto the sale value and write this value off when selling the property. If you get some of this amount refunded then that is a bonus.
I had my full retention returned with a small amount of interest from a sale in 2009. It took about 12 months for the refund.
When I sell my current property, I will try and and add a few % onto the price to cover the refund. That may i won’t get too stressed out about yet another area of Spanish corruption.