Microsoft is testing multiple repository feature in Visual Studio 2022 and it released as Preview feature.
To enable multiple repository feature, open VS 2022 => select Tools from menu and select options.
Under Preview features, you can find “Multi-repo support (requires Solution reload)” feature as shown below. Select this feature to work with multiple repositories with single solution.