Ok, I have found the solution.
First, you need to find the folder where your EU is installed (W:\Program Files\Epic Games) and change the name of UE_5.1 (or whatever version you have) to something other than UE_5.1, you can add UE_5.1_old (doesn’t matter).
Then you start the installation in the launcher (choose W:\Program Files\Epic Games) and then stop it after a few minutes, then you cut the files from your old folder to the new one, and delete the _old folder. Restart the launcher and resume installation, and it will check all the files, determine that everything is fine, and finally recognize that you have a version of UE.