I have replaced the ToC and it should work for you now in that document.
I’m not sure what you did, but all ‘I’ did was to select the ToC > References Tab > Table of Contents > Custom Table of contents > OK > Replace.
My version is Word 2019 & I have used the
F12 key on this occasion to do the Save As.
My default PDF editor opens automatically to read/view/edit the created PDF.
I have attached the altered document for you.
Click the image below to see a short video of the above.