We are also using Visual Studio 2022 (Version 17.9.6) and the SonarLint-Extension in connected mode (Version 7.8.0.88494) and this false-positive is not shown there, which is correct.
How can we solve this problem of the false detection in SonarQube?
Sorry in advance, I’m new in handling SonarQube/SonarLint.
I confirm this is a false positive that has been fixed since version 8.56.
SonarQube Community Edition, Version 9.9.2 comes with sonar-dotnet 8.51.
It would be better if you updated to a more recent SQ edition to profit from this and more fixes in the C#/VB.NET analyzer.