Currently the main page is special cased and does not become sectionized and thus does not support section collapsing. It's possible to disable the main page special casing but its not possible to enable section collapsing.
On certain third party instances however this doesn't make sense.
- When main page is not special casing e.g. $wgMFSpecialCaseMainPage = false treat the main page like a normal page - if it has headings they should be collapsible.
- section collapsing should work such as https://baripedia.org/wiki/Accueil