First the python script was executed on SampleUnchanged.docx file and the result was correct. All underscores were detected.

In the second attempt minor changes were made to the SampleUnchanged.docx file and was saved with the name SampleChanged.docx and the same python script was executed to read the new file. None of the undesrscores of the second paragraph were detected.

@scanny Please have a look. I have also uploaded the respective docx files that were used as inputs
SampleUnchanged.docx
SampleChanged.docx
First the python script was executed on SampleUnchanged.docx file and the result was correct. All underscores were detected.
In the second attempt minor changes were made to the SampleUnchanged.docx file and was saved with the name SampleChanged.docx and the same python script was executed to read the new file. None of the undesrscores of the second paragraph were detected.
@scanny Please have a look. I have also uploaded the respective docx files that were used as inputs
SampleUnchanged.docx
SampleChanged.docx