Swerve Relative Encoders not reseting to absolute posiition

Hi guys, so we are on our final steps for setting our swerve drive up to good, but we are having one final problem

So we use CTRE Srx mag encoders connected to the spark max using them as absolute encoders, and they work pretty well, we turn off and on the robot and it reads well the position of the module.
Then on code, we are resetting the spark’s encoder to the absolute positon, and when we start and enable the robot, on the shuffleboard we see that it is working, but when I start moving the wheels, the relative loses the absolute’s position and go into another position. And I don’t know how to fiix this.

Hope you can help me

here’s the code:

Thank you very much

Could you be a little more specific about your problem? Also could you include what you have tried so far to remedy this issue? Including code snippets that you have tried would also be great. Also why do you need the relative and absolute encoder to be the same in this situation? These will help us in helping you.