A mitotic chromatin phase transition prevents perforation by microtubules