the pump system is pretty simple, if the pump is working fine then from bottle to jets is just plain plastic tube. if the jets are squirting with the bonnet up then the only difference is the action of closing the bonnet; it would suggest that closing the bonnet is squashing the plastic tube at some point and restricting the flow.
the pumps themselves can suffer with moisture ingress, however this shows by the wipers coming on of their own accord. if you end up stripping it down to the pump level it is worth putting a smear of silicone around the pump joint irrespective of whether it is playing up or not. if it is then heat up the pump with a hot air gun for a while to dry it out first, but put decent quality silicone around the joint just as a matter of course. if you are that far in anyway you may aswell just do it as a precautionary detail because you have to take the headlight out, take off the wheel then partially take off the arch liner.
anyhoo, i digress, if you don't need to get to the pump then i wouldn't bother until you do need to.
going back to your original issue, unless there is a crack in the pipe, which then gets closed up when you open the bonnet (which i find almost implausable, but not completely so) then the only thing it can be is restriction of the pipe in some way. if there were dirt floating around the pipe then the pump pressure would overcome the gravity issue and it would still block up.
so if it were me, i'd be looking for the pipe being squeezed by the bonnet being closed.