Sure, you just need to use two different projectkeys, property sonar.projectKey
If you do a search for monorepo the Sonarqube docs bring up only
see “Reporting your quality gate status on pull requests in a mono repository”
Just use different sonar.projctKey, i.e. com.foo:bar-prod and com.foo:bar-dev