score:2
Retain proof of your flight to and from Spain
which would show that you returned to Spain and again came back.
Do you have any reference indicating whether this is enough?
The Schengen Borders Code should also cover this scenario
In this scenario, your are returning/leaving an area where you have a resident permit and where the 90/180 rule (short stay) does not apply.
Article 12
Presumption as regards fulfilment of conditions of duration of stay
...
2. The presumption referred to in paragraph 1 may be rebutted where the third-country national provides, by any means, credible evidence, such as transport tickets or proof of his or her presence outside the territory of the Member States, that he or she has respected the conditions relating to the duration of a short stay.
In this context outside the territory of the Member States means
Sources: