CanvasSection ->Collapsible Section needs SectionType=1 from pnp.core in order to have new section data saved
In order to get the new functionality around Collapsible Section from pnp.core to pnp.framework i did try to expand the \pnpframework\src\lib\PnP.Framework\Provisioning\Model\SharePoint\ModernExperiences\CanvasSection.cs with the Properties from \pnpcore\src\sdk\PnP.Core\Model\SharePoint\Pages\public\ICanvasSection.cs.
That way i would be able to prepare for template support. Unfortunatelly the new sections settings are not saved if SectionType=0 but SectionType is only pnp.core internal, so it can not be set from pnp.framework.
@jansenbe: I could not see why SectionType should be private and not available in interface - ok to change or did you have an other idea to get this to pnpframework
Currently Collapsible Sections on a out-of-the-box site make webparts fail to load after colapse/expande multiple times. In Browserconsole you can see that PageContext is missing or DOM can not be read.
@czullu : also with manually created pages or only with the ones created via PnP?
@jansenbe - the issue with webparts on collapsible sections is happening on out-of-the-box site collections - is unrelated to pnp (sorry for confusion)
@czullu , thx for the clarification. Regarding your initial ask: this is best logged as request for a future version of the schema (https://github.com/pnp/PnP-Provisioning-Schema/issues). Updating the model directly is not an option
In order to be able to store collapsible sections in a site template, this feature is mandatory, There is already a feature request/bug report on the schema issues page (https://github.com/pnp/PnP-Provisioning-Schema/issues/575) but unfortunately no reaction at all.
I have just opened a pull request in pnp/PnP-Provisioning-Schema repo (pnp/PnP-Provisioning-Schema#617) to add SectionType attribute to the schema.