Had this same problem, with a source-built engine… I had to do two things:
- Run UnrealVersionSelector on it’s own, this will ask if you want to make that an engine directory. Say yes.
- Open Epic Games Launcher, and when it asks to associate project files say yes.