I've found an alternative solution to that. I successfully root my phone right now. Use patch boot method. To the firmware you've downloaded use zarchiver app to get the boot.img. copy that and paste. Then download latest magisk. Go to twrp mount system then flash boot.img first then magisk then reboot without wiping dalvik cache. Then that's it
Similar here with my model mi5 but on previous 8.8.30.
I have bootloops after installing via TWRP magisk v17 (and 16 on earlier miui Dev versions). I reinstall the miui eu from TWRP to reuse my phone. Is it due to Android 8.0?
I wanted to reuse it in order to find battery tips.
How to know whether magisk is supposed to install or not?