AIPs are related to a level of borrowing and not specific properties
If you are granted an agreement in principle, then the conditional offer of a mortgage is based largely upon your financial and personal status rather than on the property itself. If the property changes, it does not normally cause an issue unless the new identified house is at a higher price or something significantly different about it (you change from an urban property to a rustic property).
For example, if you were intending to buy a house in an urban location valued at €400,000 but changed your mind and identified a different urban property in the same area, then there would be no issue with your agreement in principle.
However, if you wish to purchase a property at a higher price, or if it was one in a rustic location, then you would have to requalify or be granted a lower loan to value.
Prospective buyers in Spain do change their desired property. As long as the banks are aware and the client knows the parameters it doesn't usually cause problems.