Once ready to test, I copy the solution file (e.g. "MySolution.sln") to "MySolutionAppOnly.sln".
I then open "MySolutionAppOnly.sln" (Notepad or VS 2022) and remove the references to the test project. Then save.
I open "MySolutionAppOnly.sln" in VS 2022 and run it in debug mode.
I then open "MySolution.sln" in VS 2022 and use Test Explorer. I can then step through the test code in one instance of VS 2022 and the web solution in the other VS 2022 instance.
If you need to rebuild from a code change, rebuild in the "MySolution.sln" with neither instance running, so all the files rebuild.