Hi
You will need to complete a P85
Get your Income Tax right if you're leaving the UK (P85) to advise that you are leaving the UK and will continue to work for a UK employer.
HMRC can then advise your employer to stop deducting tax, as you will be taxable on this employment income in Spain.
If you rent out your UK property, while resident in Spain, you will need to complete a self assessment tax return to declare the rental income, as this is still taxable in the UK.
Thank you