It seems that UE5 does not have this option(Refresh Visual Studio Project).
But someone on the Internet said that right click the project file(xxx.uproject) and selete “Generate Visual Studio project files” has the same effect.
So I have tried that delete all files except “Config, Content, Source, MyProject.uproject” and regenerate the .sln file. But it does not work for me.