Please consider the following MWE:
\documentclass{book}
\usepackage[a4paper,twoside,hmargin=3cm]{geometry}
\usepackage{tikz,tikzpagenodes}
\usetikzlibrary{calc,positioning}
\newif\ifoutertikznest
\outertikznesttrue
% \outertikznestfalse
\begin{document}
\begin{tikzpicture}[overlay,remember picture,anchor=north west,inner sep=0pt, outer sep=0pt,line width=2pt]
\node[draw=red,minimum size=2cm,anchor=north west,inner sep=0pt,outer sep=0pt] at (0,0) (A1) {%
\ifoutertikznest %
\begin{tikzpicture}[overlay,remember picture,anchor=north west,inner sep=0pt, outer sep=0pt,line width=2pt] % ***
\else
}; % ***
\fi
\node[draw=blue,minimum size=2cm,anchor=center,inner sep=0pt,outer sep=0pt] at (current page.center) (A2) {};
\node[draw=green,minimum size=2cm,anchor=north west,inner sep=0pt,outer sep=0pt] at (current page.north west) (A3) {};
\begin{scope}[shift={(0.5,1.0)}] %
\node[draw=magenta,minimum size=2cm,anchor=north west,inner sep=0pt,outer sep=0pt] at (0,0) (A4) {};
\begin{scope}[shift={(0.5,1.0)}] %
\node[draw=yellow,minimum size=2cm,anchor=north west,inner sep=0pt,outer sep=0pt] at (0,0) (A5) {};
\end{scope}
\end{scope}
\ifoutertikznest %
\end{tikzpicture} % ***
}; % ***
\fi
\end{tikzpicture}
\end{document}
If you enable the \outertikznestfalse line, then there is no additional wrapping in a tikzpicture, and the nested scope shifts look as expected (image left):

However, if the rest of the image is "wrapped" under the first node (which requires an extra tikzpicture) - and this is the state, if outertikznesttrue line is enabled instead - then something is not quite right with the relative shift of the nested scopes (image right).
While I did expect the extra tikzpicture to influence the absolute placement in some way - I didn't expect that it would disturb the relative shifts between the scopes. Is this expected behavior? And how could I have the same relative position of the nested scopes (as on image left), even if I have an extra tikzpicture wrapper?