Dear Stefan,
I filed a bug report, but nothing happend:
http://sourceforge.net/p/pgf/bugs/354/
The issue is related to pgf drivers, pgfsys-xetex.def and
pgfsys-dvipdfmx.def which is called by the former.
Your example works if you use the other driver: pgfsys-dvipdfm.def,
see below. However, don't expect that the way is always ok.
%
% xelatex
%
\documentclass{article}
%deceive the driver
\def\pdftexversion{140}
%use the old driver for dvipdfm
\def\pgfsysdriver{pgfsys-dvipdfm.def}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\begin{document}
x\pgfmark{tA}some text \pgfmark{tB} some text
\begin{tikzpicture}[remember picture]
\draw (0,0)node (A){A} rectangle (1,1)node (B){B};
\end{tikzpicture}
\begin{tikzpicture}[remember picture]
\draw (0,0)node {\pgfmark{nA}} rectangle (1,1)node {\pgfmark{nB}};
\end{tikzpicture}
\vspace{3cm}\centering
\begin{tikzpicture}[overlay,remember picture]
\draw[red,->] (0,0)--(pic cs:tA) (0,0)--(pic cs:tB);
\draw[blue,->](0,0)--(pic cs:nA) (0,0)--(pic cs:nB); %nB faulty
\draw[green,->](0,0)--(A) (0,0)--(B);
\end{tikzpicture}
\end{document}
Best,
Akira
--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex