Have you considered fabricating a panel of mesh netting to fit your cabin door opening - for easy stowage? With a perimeter hem and grommets, it could be hooked onto clips attached to the door head, stretched taunt and hooked under the aft edge of the berth platform. Perhaps a couple of side attachments would be added also for extra security.
Edit - as usual, SD beat me to it.