[Xiaomi Redmi Note 5 Pro Questions & Answers] Aurora333:
I had the same issue, which I also managed to fix. I thought I'd share what I did here.

My phone was bricked with access to MIUI recovery and Fastboot. My phone was locked, however my phone was not linked to my Mi account, and so I couldn't unlock it using the Mi Unlock tool. The only way to get into EDL mode was via the testpoint method. It's not as scary as people may think.

Many of the YouTube videos on testpoint show that you have to touch the two terminals while pushing the cable into the phone. Several times I was able to activate EDL mode without doing both at the same time - i.e. I could just connect the cable and touch the two terminals (I used a paper clip) and the phone would enter EDL mode. I think it might have had something to do with me pressing the power button. In my case, I had to have the battery disconnected from the circuit to get into EDL mode.

I used the Xiaomi Flash tool. Always remember to select not to relock the bootloader. I think it's stupid that relocking is the default option and that the radio buttons are at the bottom of the program and sometimes not visible on a laptop. That's how I got into this mess in the first place!

One of the things that I think causes the "MIUI version" problem is attempting to install the incorrect stock ROM. The phones may be fussy about which stock ROM they will accept. In my case, I thought the phone was a global version, then worked out that it was probably a Chinese version.

I replaced the firehose files in all the ROMs I attempted flashing with the ones supplied on XDA. The Xiaomi Flash tool reported success several times, but when starting up the phone it would go into recovery with the "MIUI version" message. I tried about six different MIUI ROMs with the testpoint method, both global and Chinese, before stumbling on the one that worked (after replacing the firehose files): whyred_images_V11.0.2.0.PEICNXM_20191023.0000.00_9.0_cn

When I got back into MIUI, I linked the phone to my MI account and then attempted flashing the latest LineageOS (which was what I was trying to do in the first place), using the Lineage recovery. The phone wasn't accepting the Lineage recovery, so I flashed OrangeFox-R11.0-Stable-whyred. I had to boot to Orangefox in order to flash it. You copy the Orangefox zip file to your phone using your computer when you have MIUI up and running, then you enter Fastboot and run the following command from your computer:

fastboot boot recovery.img

From Orangefox, you then select the Orangefox zip file on your phone and swipe to install.

Once that was done, I rebooted to recovery and did a wipe of the phone. It wasn't enough for me to wipe Dalvik/ ART Cache and Cache (as recommended), I had to also wipe System, Vendor and Data. (I tried just the first two and the LOS installation was corrupt, even though it was reported as being successful.) I then copied LOS to a micro SD card, inserted it into the phone and mounted it, before flashing LOS by navigating to the zip file on the SD card, selecting it and selecting wipe to install.

Finally success!

I think the key with the testpoint method is to keep trying ROMs until you stumble on the one that works. If the Xiaomi Flash tool reports success, I think it means you are doing something right. I also wonder if a lot of people who have the "MIUI version" issue have a phone with the Chinese ROM and don't realise it.

Hope this helped someone!