Hello,
The appearance of Table of Contents entries are controlled by thhe TOC styles.
The formatting of each item at the same level must be the same. So if you use Heading 1 for your headings in your front matter, and Heading 1 in your document body, the formatting will be the same.
Consider using a lower-level heading for your front matter headings if you do not want page numbers. You can modify these styles so they appear the same as Heading 1. This is often done with Appendices.
Heading Numbering is best done tied to styles following the directions given in
How to create numbered headings or outline numbering in Ribbon Versions of Word by Shauna Kelly.
Here are some resources: