This will be here with White to play
Don't worry if a computer does not like your idea. Nothing wrong with Nd7.
You were snffing about for a plausible looking inexact move and that is what you got as a reward.
You are playing a human not a machine.
These things never ever anticipate an inexact move and in over whelming
positions like this where White is material up and has a stomping attack I've
seen them play some daft things because they calculate too deeply.
For instance after 21.Nd7
Just suppose unknown to us it can see a forced White mate in 22 moves.
The only way to stop this is to play 21...Qxd7.
It will not start playing tricks and traps expecting or looking for a slight error,
nor will it make the best defensive human moves forcing the human
to play his best moves.
The mate will be far beyond a humans powers of calculation - they will not
see what it sees. There is a very strong chance the attacking human will
choose moves that differ from what the computer sees.
The computer will play 21...Qxd7 becuase it anticipates only best replies.
It cannot do anything else. It is a machine. It does not even know it is playing a game.