Sorry Arthur, the tax in Spain is quite a bit higher than in UK. Tax free allowance in UK is £10,600 in Spain it is around £5,000.
The UK Gov is not losing anything (apart from possibly all or some of the pensions are not being spent in UK). Pensioners in UK are able to claim more allowances than those who have chosen to live in Spain .
And according to Google, so to quote you, without a doubt, Sir Sean Connery actually does not live in Spain but in the Bahamas, which unlike Spain, is a tax haven.