For many devices, Magisk can handle the patching process directly within the app.
When you patch a boot image for root access, its hash changes. patch vbmeta in boot image magisk
During startup, the bootloader checks the vbmeta signature against the boot image. If they don't match, the device rejects the modified image. For many devices, Magisk can handle the patching