I have a large ODM document.
When I export the document to PDF the references work and the PDF index
(table of contents) works correctly (page numbers correspond to
document pages).
However the table of contents included in the document - generated
using the Table of Contents feature - is all off my a few pages.
see
http://www.wmmi.net/documents/LibreOfficePageNumbersTOCIssue.20211022.png
LibreOffice 7.1.5.2