This should work. We have a GeneratedCodeRecognizer which we use to tell if a file has been autogenerated, and we skip that file from analysis. There is a setting to enable analyzing generated code (see https://docs.sonarqube.org/latest/analysis/languages/csharp/), but it’s disabled by default. Could you please check that setting in your SQ instance?
We have this on our internal roadmap to improve (i.e. treat exclusions in the Roslyn analyzer, not when importing the Roslyn results after the build).