That's right, once you apply for Spanish nationality, it will take some time before the answer arrives.
During this time your residency could expire, it is essential that you renew your residency and maintain your resident status until the day you receive your Spanish DNI.
If the residency expires, and you fail to renew it, you would enter into a supervening irregularity that could affect the Jura de nacionalidad process.