I'm trying to draw an arrow with opacity=.35, but the shapes are overlapping, which makes the opacity stack.
I tried the solution of How can I draw a semi-transparent arrow in TikZ without internal overlap?.
But it doesn't work for me, because I'm using tikzpicture with the option overlay.
MWE:
\documentclass[varwidth, border=50]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\begin{document}
\tikzset{->/.style={ultra thick, -{.Latex}, blue}}
\begin{tikzpicture}[overlay]
\draw[->, opacity=.35] (0,.5) -- (1,0.5);
\begin{scope}[opacity=.35]
\draw[->] (0,0) -- (1,0);
\end{scope}
\begin{scope}[transparency group, opacity=0.5]
\draw[->, red] (0,-0.5) -- (1,-0.5);
\end{scope}
\end{tikzpicture}
\end{document}
The third arrow doesn't show up.
In fact, none of the scope's content shows, when using overlay and transparency group together. When I remove either of those options, the scope contents are visible again.
Why is the scope not visible, and how can I make it visible?
Edit: Apparently the problem is known, and the manual suggests as a workaround to place the contents in a \transparencygroup within a tikzpicture within a node. Like this:
\node[left] at (1.15,-0.5) {
\begin{tikzpicture}
\pgfsetfillopacity{0.35}
\pgftransparencygroup
\draw[->, red] (0,-0.5) -- (1,-0.5);
\endpgftransparencygroup
\end{tikzpicture}
};
The major drawback to this workaround is, that it requires manually adjusting the placement, which kinda defeats the purpose of using TikZ. Does anyone know a better way?

pgfinterruptboundingboxenvironment instead, i.e.\begin{tikzpicture}\begin{pgfinterruptboundingbox}…\end{pgfinterruptboundingbox}\end{tikzpicture}. If you need this often, you can define your own environment or key for it, of course. Thetransparency groupworks now (becauseoverlayis disables but the whole diagram's bounding box is thrown away at the end). The vertical alignment maybe needs adjustments but it does so withoverlay, too, I believe. – Qrrbrbirlbel Sep 04 '23 at 12:35