If the spanish home was your only home surely the UK can’t tax on that! Leaving the money in spain will only get measly interest rates anyway.
If you are resident in the UK then you will be liable to UK CGT on an asset in Spain.
If it is your only home in the UK it may be exempt, but if it is in Spain it will not be exempt.
The moral is, don’t tell the UK revenue and keep the proceeds out of the UK. That’s illegal I know, but it is probably the preferred route.