I am trying to analyze the below middle game with White to move. I played Nxd3 to capture Black's queen. However, the engine analysis says that a better move is Rxa7.
[FEN "r5k1/r4pp1/3P3p/8/8/1p1qP1P1/1Np2P1P/R1R3K1 w - - 0 1"]
If I stick to my play, I expect the these moves-1. Nxd3 Rxa1 2. Rxa1 Rxa1. White would gain a queen and a rook, while Black will gain two rooks.
If I follow the engines suggestion, I expect the these moves- 1. Rxa7 Qd5 2. Rxa8 Qxa8. White would gain two rooks, while Black will gain one rook.
From the perspective of white, wouldn't it be better to capture the Black queen? Black certainly seems to have a stronger position, but letting the Black queen go seems counterintuitive to me. I am certainly missing something and would appreciate your insights here.