Previously today I posted the following comment on the wrong question - too much searching!
I've been struggling with this bug for several months and it's tricky to pin down.
I work for law firms which often use [Run-In Sideheads]. I use the Style Separator in a macro that is used to pull two paragraphs together. That is, the Heading is one paragraph, and the text is another. The purpose behind this is to ensure that the text that follows the heading is formatted properly and there are no dueling indents. http://wordfaqs.ssbarnhill.com/RunInSidehead.htm
Because it's automated, there's no danger of double Style Separators or Separators at the end of a document. None of the documents or templates in which the Style Separator resides crash. But as PCs are updated to the latest version of M365, they open a file that used to work only to find "the numbers have disappeared." And they don't print.
Suddenly, a document that "worked" and printed properly, doesn't. The only change seems to be the version of M365.
Starting last year this bug infected client PCs on which M365 updated to V 2511 Build 19426.20218. Reverting the PC to V 2511 Build 19426.20186 resolved the issue.
The problem I have in using this as a hard and fast solution is that I have two different PCs with 32-bit M365 installed. On one, 20218 "works" and on the other, it does not. Reverting to 20186 restores the visibility of the numbers. I have also seen this dicotomy on two laptops running 64-bit M365.
I checked File > Options > Display and toggled view hidden text on and off and it doesn't seem to matter if hidden text is set to be visible or not. If I turn on the Navigation Pane I can see the heading numbers there. If I turn on draft mode the numbers are visible. But in neither case will they print.
And for the record--inserting Style Separator manually, without the macro--makes no difference.
I would love to get to the bottom of this, but it looks like the only ones who can are the programmers at Microsoft.