Magic square constraint

I am writing constraints for magic square. It seems something is off with my last constraint. Can any one tell me what is wrong? I get the correct answer as all 5’s which is still valid, but it doesnt give anything other than that.

class test;
  rand int arr[3][3];
  
  constraint ab_c {
    foreach (arr[i,j]) {
      arr[i][j] inside {[1:20]};
      arr[i].sum() with (int'(item)) == 15; // rows
      arr.sum() with (int'(arr[item.index][i])) == 15; //cols
      arr.sum() with (int'(arr[i][i])) == 15; // diag1
      arr.sum() with (int'(arr[2-j][i])) == 15;// diag2
      
    
    }
  }
  
     
  
endclass

Can some one help here?

This question has been asked before.

The question here is why is the last constraint for diag2 always produces the same result. Yes i know this was asked before.

class test;
  rand int arr[3][3];


constraint ab_c {
    foreach (arr[i,j]) {
      arr[i][j] inside {[1:20]};
      arr[i].sum() with (int'(item)) == 15; // rows
      arr.sum() with (int'(arr[item.index][i])) == 15; //cols
      arr.sum() with (int'(arr[item.index][item.index])) == 15; // diag1
      arr.sum() with (int'(arr[item.index][2-item.index])) == 15;// diag2
      
    
    }
  }
  
     
  
endclass

Thanks !