No one helped me with this issue, the only solution I found was to flash another rom (including wipe user data). It's annoying but the only thing that helped me. Both times it happened to me - the rom itself was defective and I had other issues such as lags as well..
I can't sign in to my mi account because of this, and this is not the only issue - the device is seriously lagging. The screen freezes every few seconds even now as I am writing this text.
I flashed 6.2.18 using sp flashtool since my bootloader is still locked. I had the same issues when...