When I paste something LibreOffice creates a commentary called "StartFragment" and "EndFragment". How to avoid or remove this?
This means that LibreOffice used HTML format stored in the clipboard; and by default, it includes comments (for whatever reasons). Personally I believe that if these comments are ever useful, they shouldn’t be the default; but this deserves an enhancement request (which you might file if the issue bothers you).
In the meanwhile, you might use
HTML format without comments when pasting:
Removing the already inserted comments is done by right-clicking the comment (blue rectangle on your screenshot) and choosing a suitable option starting with