If the application is made by an agency, the writing fee is usually non-refundable, but you can discuss with them to refund the defense fee for the actual trial. If the patent is withdrawn due to the responsibility of the agency, it can negotiate with the agency to refund more agency fees.
Responsibility, if it is an individual application, there is no responsibility; If it is a company's application for service invention, it needs to be negotiated with the company.
In addition, if it is withdrawn at the time of preliminary examination and not made public, the technology can be used in future applications without affecting the innovation of new applications.