Installing Magisk also modifies the boot.img so locking the phone with Magisk installed will have the same effect.