How to cancel registration before patent authorization

If the patent is withdrawn before authorization, it is not a patent, but a patent application, so there is no problem that the patent is regarded as nonexistent from the beginning, because the application has never been authorized.

If the patent is withdrawn because it was not published before the announcement of the Intellectual Property Office, then the patent is still novel. If it is withdrawn after the announcement of the Intellectual Property Office, because the patented technology has been made public, it is not novel.