Do not use the Box to wrap your TableOfContentsTree.
<PageRender
{...config}
paperOptions={{
paperSize: 'a4',
}}
header={() => <header>header goes here</header>}
footer={() => <footer>footer goes here</footer>}
>
<TableOfContentsTree tree={sections} />
</PageRender>