Hey mate. You should name your slots, something like “item-1” and so on. Giving the name to each slot would preserve your overrides as you change number of items in your layout grid component.
Right now your slots does not have any name overrides so when you change number of items via variants Figma does not know how to preserve your overrides
UPD Does not seem to work… For some reason Figma does not keep name overrides, whenever I swap a slot with test component it seems fine, however when I change the number of slots it drops the name override
In the video below you can see that whenever I change the number of items rows are loosing their name overrides somehow
You linked to the thread where I gave the solution to the original author.
Have you tried it? The same solution works for your case as well (even without the “Instance swap” property).
I edited the “LayoutGrid” component and added exposed nested instances properties for the “TestItemGrid” and “FormsCheckboxList” components (to change variants at the top level), and added text properties for the “TestComponent” and “FormsCheckbox” components (to preserve overrides when swap nested instances).