It is necessary to contact the social security authorities at the address of residence and write an application for refusal of the certificate of registration of an internally displaced person.
You can also submit an application online through the Diya web portal - https://diia.gov.ua/services/skasuvannya-statusu-vpo.