Making up the hatch is pretty straight forward, but getting them to stay put in wild weather not so easy.
I tried various methods, magnets, pins, pegs, wood blocks etc but finally went for a really simple way.
I used polyethylene foam (not polystyrene) that is closed cell and spongy.. Cutting a pad that firmly fits into the hatch opening and extending just below the deck, I glued in to the underside of the hatch.
From then on your hatch becomes a virtual “cork”. Easy to fit, simple to remove while staying put otherwise. It should also be relatively waterproof.
This foam is often found in electronic device boxes to protect the item.