Answer is in the docs https://mui.com/material-ui/api/accordion/
If you want to stop the gap between accordions when expanded type add "disableGutters" within in the <Accordion tag e.g. <Accordion disableGutters key={listId} defaultExpanded sx={{ backgroundColor: "#c12", color: "white" }}
that removes the default gutter gaps between accordions