This is an issue in the Emacs LilyPond mode. In the following example the indentation of lines following the end of a manually set beam is wrong.
\version "2.24"
\relative c'{
<c e>8[ <d f>]
<e g> %% run (Lilypond-scan-containing-sexp) in this line
}
As a workaround put something in between the characters ">" and "]", like:
<d f> ]
<d f>8]
Best regards
Andreas
