$\newcommand{U}{\uparrow}$
$\newcommand{D}{\downarrow}$
$\newcommand{F}{\nearrow}$
$\newcommand{G}{\searrow}$
$\newcommand{O}{\otimes}$
Fascinating$\newcommand{U}{\uparrow}
\newcommand{D}{\downarrow}
\newcommand{F}{\nearrow}
\newcommand{G}{\searrow}
\newcommand{O}{\otimes}$Fascinating question. Here goes an involved, but essentially bijective, argument.
Note that $g$ allows to establish more product representations for sizes of similarly defined $W_{p_1, \ldots, p_k}$ visiting many prescribed points on $y = 0$, but matching LHS sumsums have to look differently.