I think I’ve figured this out. Instead of creating a block variation, I just created a brand new block using a block template.
import { registerBlockType } from "@wordpress/blocks";
import { useBlockProps, InnerBlocks } from "@wordpress/block-editor";
const BLOCKS_TEMPLATE = [
["core/heading", { level: 2, placeholder: "Heading" }],
["core/gallery", {}],
];
registerBlockType("logo-grid", {
apiVersion: 2,
title: "Logo Grid",
icon: "smiley",
category: "media",
edit: () => {
return (
<div {...useBlockProps()}>
<InnerBlocks
orientation="horizontal"
template={BLOCKS_TEMPLATE}
templateLock="all"
/>
</div>
);
},
save: () => {
return (
<div {...useBlockProps.save()}>
<InnerBlocks.Content />
</div>
);
},
});