Hi @AlzaMartinHoly,
Correct me if I m wrong but, in the first code sample you provided, this is the vulnerability rule that raised an issue:
This rule is not enabled in SonarLint (see details here) so that’s probably why you see nothing in Visual Studio.
Thank you for your code sample I will have a look and then come back to you.
Best.