For me it was flashing the firmware from the stock ROM which fixed the issue. Basically, I switched from 11.0.8 MIUI to PixelPlusUI. After that, I realized the phone can't detect any baseband information like IMEI etc.
So I flashed the firmware from 11.0.8 MIUI stock ROM and it worked again. If it doesn't work for you, try a firmware from another version. It should eventually work.