When use the command \subnode to label some texts, some problem appears.
The following is the codes.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\begin{document}
\begin{tikzpicture}[remember picture,>=stealth]
\node{Assume \subnode{f}{$f'(x)$} exists};
\draw[->] (0,1) to (f);
\end{tikzpicture}
\end{document}
The target of f defined by \subnode will be wrong if compile with xelatex.
The result looks like the picture.

But, when compile using pdflatex or lualatex, the problem disappears.

I don't know whether the problem is due to tikzmark or xelatex itself.
When use the command
\subnodeto label some texts, some problem appears.The following is the codes.
The target of

fdefined by\subnodewill be wrong if compile with xelatex.The result looks like the picture.
But, when compile using pdflatex or lualatex, the problem disappears.

I don't know whether the problem is due to
tikzmarkor xelatex itself.