This is a VS-code extension issue more than a Stylelint one.
A hackfix is available at https://github.com/stylelint/vscode-stylelint/issues/490#issuecomment-2156218548.
[…] in VS Code, open the command palette and search "Preferences : Open User Settings (JSON)" and add this line in the json settings :
"stylelint.customSyntax": "postcss-scss"