There's no way to intercept the --remote-silent
; you have to send explict commands to open the file with --remote-send
instead. There, you can encode logic to deal with the NERDTree window, e.g. to move to the previous one if it is active:
$ gvim --remote-send "<C-\><C-n>:if &ft == 'nerdtree'|wincmd p|endif|edit filename<CR>"