Yes. You do run the risk, however, that if the new build deed (obra nueva) contains errors, the land registry refuses the registration of the obra nueva. The developer must then make adjustments to these obra nueva. Consider, for example, a correction of the number of official square metres of the flat.
In case the sale deed is executed before the completion of registration and if then the application for registration is refused for some reason, your title is based on a wrong situation. This erroneous situation must then be rectified thereafter with the cooperation of the developer.
Therefore, we recommend signing the deed of sale only after the registration of the obra nueva was completed.