I'm not sure about enclosing, but you could add netting, or even a sunbrella sleeve that fits over the
lifelines, and connects them with a panel.
I've added enclosure for most of my
Leopard 44
cockpit.
Another thing you could do on passages is move the
dinghy down, and put cargo straps on the far side to tip it
Keel out, and seats inward at about 45 degrees with the bottom tube resting against the outer lip to block the middle cockpit area.
Added bonus your
dinghy will drain any big wave sp;ashes, and the dinghy
keel will block any large following waves from breaking into cockpit area.