LStrip and Trim apply correctly for {% ... %} tags, but don't work for {# ... #} tags.
In Jinja2 (python), the two work the same:
Python 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from jinja2 import Environment
>>> env = Environment(trim_blocks=True, lstrip_blocks=True)
>>> template = env.from_string("""<div>
... {# a comment #}
... yay
... {# another comment
... This time, over multiple lines
... #}
... whoop
... </div>""")
>>> template.render()
'<div>\n yay\n whoop\n</div>'
>>> print(template.render())
<div>
yay
whoop
</div>
I've created a PR to fix this.