The same thing happened to me in my note 5 pro with miui 11, I had to reinstall miui 10 and delete all magisk packages and uninstall magisk, then I reinstalled miui 11 and it worked perfectly. The cause was magisk packages that were incompatible with miui 11.