Doesn't \clip work (= clip all subsequent drawing) if it is defined inside a pic?
MWE
\documentclass[tikz]{standalone}
\tikzset{
crop/.pic={
\clip (current bounding box.south west) rectangle (current bounding box.north east);
}
}
\newcommand*{\clipshape}{\clip (current bounding box.south west) rectangle (current bounding box.north east);}
\begin{document}
\begin{tikzpicture}
\draw[help lines] (-5,-5) grid (5,5);
\draw[very thick,color=black,domain=-5:5] plot (\x,{2*\x});
\end{tikzpicture}
\begin{tikzpicture}
\draw[help lines] (-5,-5) grid (5,5);
\clip (current bounding box.south west) rectangle (current bounding box.north east); % THIS WORKS
\draw[very thick,color=black,domain=-5:5] plot (\x,{2*\x});
\end{tikzpicture}
\begin{tikzpicture}
\draw[help lines] (-5,-5) grid (5,5);
\clipshape % THIS WORKS
\draw[very thick,color=black,domain=-5:5] plot (\x,{2*\x});
\end{tikzpicture}
\begin{tikzpicture}
\draw[help lines] (-5,-5) grid (5,5);
\pic{crop}; % THIS DOESN'T WORK
\draw[very thick,color=black,domain=-5:5] plot (\x,{2*\x});
\end{tikzpicture}
\end{document}
Screenshot

\begin{scope} \clip (current bounding box.south west) rectangle (current bounding box.north east); \end{scope}the clip won't affect the stuff after\end{scope}either. So the bottom-line is that aclipin apiconly affects stuff inside the pic. (Otherwise it would be fatal for many pics which precisely use local clips.) – Dec 22 '19 at 20:08