Consider this script:

\documentclass{report}
\usepackage{lipsum}
\usepackage{longtable}
\begin{document}
\lipsum[1-3]
\lipsum[4][1-12]

%another paragraph
\begin{longtable}{lr}
\caption{\lipsum[1][1-3]}\\*
\label{tab:results}\\*
\hline
A&B\\
c&D\\
E&F\\
A&B\\
\caption[]{Continued.}
c&D\\
E&F\\
A&B\\
c&D\\
E&F\\
A&B\\
c&D\\
A&B\\
c&D\\
E&F\\
A&B\\
c&D\\
A&B\\
c&D\\
E&F\\
A&B\\
c&D\\
\end{longtable}
\end{document}

The conjoint implementation of \endfirsthead and \endhead works fine at breaking the table across pages (Putting longtable caption text on subsequent pages):

However when I uncomment %another paragraph% an out of place "Continued" appears:

What is wrong and how to fix the problem?

• i cant reproduce your problem. document example works as expected. however your header is unusual. it really need four rows? – Zarko Apr 14 at 13:50
• @Zarko I can:-).... – David Carlisle Apr 14 at 14:09
• Sorry bad interaction of an automatic page break just at the point longtable is switching the output routine, you could report it at the github issue tracker but an immediate workaround is to use \clearpage just before \begin{longtable} – David Carlisle Apr 14 at 14:11
• You can use the patch from tex.stackexchange.com/a/384462/2388 (@DavidCarlisle) – Ulrike Fischer Apr 14 at 14:51