I don’t encourage keeping them in the same enclosure at night. Ducks are more instinctual and when they get hormonal they’re less reasonable than even geese and ducks more often in my experience bully the geese and they just don’t stop. It makes the geese anxious which encourages the ducks to bully them more.
Eventually when the geese have had enough they will turn on their bully or whichever duck is closest and it doesn’t usually end well, one of my drakes wouldn’t stop bullying some of my geese until “Friday” my female goose had enough and she beat him within an inch of his life, and that was out in the yard, I keep them in separate pens at night.
There are people on here that keep ducks and geese together without issue so my experience isn’t everyone’s but geese and ducks are all individualistic so flock dynamics vary. For their sake however it’s better to play it safe and have separate night pens/coops so no one is trapped together if things do go bad.