Calling it an "inaccuracy" is nothing more than the engine saying that it evaluates the position after one move to be a certain amount better than after another move. It doesn't necessarily mean a move is "bad".
Both d-pawns cannot be kept no matter what Black does. After 1...Ne4, if White plays Nxe4, the recapture will leave the c4 knight without a defender, and it doesn't have a lot of places to go. White can win the pawn on e4 and attack that knight. And the dark squares around the Black king are just a bit weak. Black is still winning though.
If instead Black plays ...d4, this forces some trades. Simplifying the position seems like a good idea for Black, since they are winning. Overall Stockfish likes this option better.
Here's a comparison showing what the next few moves might look like for each option:
[FEN "r2q1rk1/1p3ppp/p4n2/2Pp4/1Pn5/P1Bp3P/3N2P1/R2QN2K b - - 4 21"]
1...Ne4 (1...d4 2.Nxc4 dxc3 3.Qxd3 Qxd3 4.Nxd3 ) 2.Nxe4 dxe4 3.Qg4 g6 4.Qxe4 *