Thank you all for your support.
I am from Spain, so I suppose that rules are different from those from A8 countries.
Since permanent residency is lost after 2 years outside the UK, besides citizenship, is there any other way of getting a permanent residency that will not expire in 2 years?
Well, I am an EU national and I have been living and working in the UK for 13 years.
Permanent residency is usually given to people living and working at least 5 years.
The question is, do I lose my rights totally when moving back to the EU?
I have been living in the UK for 13 years, and fully working for 8 years, P60 forms for every one of the 8 years.
However, I am about to move to Germany in a month time. Since I want to keep my options open, can I apply for the EEA PR after I move to Germany?