how did you expect to flash miui 13 on twrp? first there is not a good working twrp for ultra and there is not a twrp miui13 stable rom...
If you want to flash stable miui13 use fastboot...
So run the script with format data
At least thats what i am thinking
If you are going from weekly...
make backup, copy to pc. flash latest a11 release, setup/restore backup, then fastbnoot update latest weekly, so no format just update bat file and storage issues are not there
to be clear... you cant simple downgrade to flash a11.
Make backup off your apps and settings.
To avoid brick you must/can miflash last a11 rom.
After this you can boot and flash twrp, flash latest a11 weekly.eu. format data.
Boot and setup and restore your backup(or set up by hand , so all...
guys i tried several builds and also cn builds.... if you want to "fix" the storage issue, to solve do the following...
Set up the phone on the latest a11 weekly, so all the apps and accounts.
Then you can dirty flash the latest 21.12.8 android 12 weekly on top. then you good to go