On Mi Max 3, encryption doesn't work.
There's some vague suggestions that make reference to the modification of /system/vendor/etc/fstab.qcom, but that method makes the Mi Max 3 refuse to boot the ROM, and immediately enter TWRP, which subsequently hangs.
Then you must flash orangefox instead...