There are 3 approaches to solve the issue, I can think of.
You can create a parent bean and extract the common attributes to it and then extend the 2 beans from the newly created parent bean, that way you will not get code duplication.
You can exclude beans from sonar -- because beans are just beans and you don't have to really worry about doing a sonar analysis on them but still it still may be good to perform a sonar analysis on the beans too, depends on what you want to do. You can find details here on how to do it: SonarQube Exclude a directory
You can change the order of the fields -- This is a dumb thing to do but I used to do it just to resolve the sonar issues.
for example, if both files have
int a;
int b;
int c;
int d;
change it to
int a;
int c;
int b;
int d;
this will trick the sonarqube