ISO 9001:2015 does not include any concrete requirement regarding the timing for closing a non-conformity. However, clause 8.7.1 includes this "prevent their unintended use or delivery" which can be used by an auditor to raise the risk that a long-term nonconformity in the quarantine zone could be confused with conforming product and be treated as such. Of course, this will depend on the fragility of the means of identifying non-conformities and on the greater or lesser capacity for effective segregation of the quarantine area. A padlocked zone is safer than a zone simply marked on the floor. Long stays in the quarantine zone can be a symptom of a deficient capacity to deal with non-conformities.
The following material will provide you information about nonconformities: