The 3% isn’t a capital gains tax, it is a retention against unpaid taxes. Was introduced because so many non-residents skipped the country owing CGT, and local council taxes.
Agree generally though about the plus valia and other taxes. Find it difficult to believe that someone would have to pay 4500 plus valia for an apartment in gamonal. We paid less than that on a villa owned 11 years in marbella!