You flashed Magisk in flash sequence? All here use anykernel and you can check yourself that nothing in the scripts accesses persist. TWRP flashes the zip, you thought about a TWRP error caused it. Magisk is active too, well. The kernel itself definitely doesn't crash persist, fact.Now I am wondering what may have caused the corrupted persist partition then
Many people not even use my kernel or any other custom kernel crashed their persist, why if kernel causes it?!