I took the non-compliant code example from a rule page, and put it into a dotnet core project. On scanning, sonar does not flag the non-compliant code with a code smell.
https://rules.sonarsource.com/csharp/type/Code%20Smell/RSPEC-4462
dotnet-sonarscanner version 4.9.0
sonarqube version: 8.3.1.34397