Not a bug technically, but maybe functionally.
Seems to me a horizontal line is a separator and not actually part of any text/attachment that precedes or follows it. That horizontal lines are treated as text when folding seems problematic.
The only way I have found to have the line not fold with the text preceding it is to add a blank line with a new header above the horizontal line. Not ideal.
As a suggestion, I would like to see the presence of a horizontal line as the endpoint of a fold of everything just above it…leaving the line itself visible.