Defect formation beyond Kibble-Zurek mechanism and holography