Setting the analysis parameter sonar.verbose=true should reveal to us how the base directory is being derived. See here (relevant line surrounded by asteriks).
SonarScanner for MSBuild 5.4.1
Using the .NET Core version of the Scanner for MSBuild
16:31:24.058 16:31:24.031 Uninstalling target: /Users/colin/Source/dotnet-test-base/dotnet-test/.sonarqube/bin/targets/SonarQube.Integration.targets
16:31:24.058 16:31:24.058 sonar.verbose=true was specified - setting the log verbosity to 'Debug'
16:31:24.059 Loading the SonarCloud analysis config from /Users/colin/Source/dotnet-test-base/dotnet-test/.sonarqube/conf/SonarQubeAnalysisConfig.xml
16:31:24.059 Not running under TeamBuild
16:31:24.059 Analysis base directory: /Users/colin/Source/dotnet-test-base/dotnet-test/.sonarqube
Bin directory: /Users/colin/Source/dotnet-test-base/dotnet-test/.sonarqube/bin
Config directory: /Users/colin/Source/dotnet-test-base/dotnet-test/.sonarqube/conf
Output directory: /Users/colin/Source/dotnet-test-base/dotnet-test/.sonarqube/out
Config file: /Users/colin/Source/dotnet-test-base/dotnet-test/.sonarqube/conf/SonarQubeAnalysisConfig.xml
16:31:24.06 Generating SonarCloud project properties file to /Users/colin/Source/dotnet-test-base/dotnet-test/.sonarqube/out/sonar-project.properties
16:31:24.089 Setting analysis property: sonar.visualstudio.enable=false
16:31:24.106 The supplied Code Analysis ErrorLog file is a valid json file and does not need to be fixed: /Users/colin/Source/dotnet-test-base/dotnet-test/.sonarqube/out/0/Issues.json
**16:31:24.123 Using longest common projects root path as project base directory: '/Users/colin/Source/dotnet-test-base/dotnet-test'.**
16:31:24.135 Dumping content of sonar-project.properties
The Soundcloud project I made was not directly linked to the Azure project, as I also had an UI project which WAS linked to the Azure project.
Since then, I figured out the function and use of the Monodevelop projects. With that, I was able to set it up so that both the API and UI point to the same Azure repository, and with that, this problem has been fixed.