Clean flash instructions with magisk.
1. Wipe system,data,cache,dalvik.
2. Install firmware (although I have read its not necessary I still do it, better safe than sorry).
3. Install ROM.
4. Install GApps.
5. Install Magisk.
6. Reboot to system. (Takes about 5 mins - depending on Gapps size I think).
7. Go through setup wizard and set up your phone.
8. Remove uneeded system apps using TB. Restore all apps. Restore all settings the way you want it.
9. Again go to recovery flash any magisk modules you want, or other things (like MIUI camera).
10. Reboot to system and enjoy.
These are all the steps to fully working enjoyable clean flash.
Maybe it's a problem with your magisk zip. Make sure you get it from here.
https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445