I have a bank guarantee here issued by Cam Bank. I know the developer pays an amount of money for it to be issued so its the banks money at risk not the builder.
The wording is quite specific and states that if the development doesnt start, or finish or if the developer is unable to provide the clear escritura and first license of occupation the bank guarantee can be used to reclaim the stage payments. It also has the date of completion for the property and that if the license of first occupation is granted then the guarantee is no longer in force.
Not sure how banks can wriggle out of them but maybe other banks use different wording.