from the slightly changed examples this mermaid flow shows that the end is rendered inside subgroup.
flowchart TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think} --> z(END)
C -->|One| D[Laptop] --> g1
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
subgraph G
g1(some) -- yes --> z
end
how to change it to always have the end note beeing outside of subgroups ?
z(END)is being included in the subgraphGbecause you've included it there:It isn't entirely clear what you're going for, but if you move the connection between
g1andzoutside of the subraph, I think it will do what you want: