Just because I also had this issue just now:
Apparently enabling Rider Link sometimes doesn’t also enable source code access in UE5. I manually edited the .uproject file and removed the bit that’s circled in red and it immediately picked it up and set rider as default source editor.