Rule not detected RSPEC-4275

Hi Team,

Sonarqube version 25.5
Lang: Java
SonarScanner version: 5.0.1.3006

The expected SonarQube bug appears not to be caught in the code below, even though it’s caught in a very similar code as seen in the screenshot. Any thoughts?

class A {
    private int x;
    private int y;

    public void setX(int val) { 
        this.y = val; 
        String deadStore1 = "abcdefgh"; 

    }
    public int getY() {
        String deadStore2 = "abcdefgh";
        return this.x;
    }
    public void showBug() {
        this.setX(5);
        System.out.println(this.getY());

    }

}

screenshot of code scan results