Where the refugee status or the subsidiary protection status ceases to exist, the decision by the determining authority of a Member State to withdraw the status does not prevent the third-country national or stateless person concerned from applying for residence on the basis of grounds other than those which justified the granting of international protection or from continuing to remain legally on the territory of that Member State on other grounds, in particular when holding a valid Union long-term residence permit, in accordance with relevant Union and national law.