Unwanted spacing of formulas

I think, it’s terrible, that formulas have spacing on the left and right. If I have a formula inside the text line followed by the comma, I have to put the comma inside the formula, or it’ll look wired. And this is completely wrong way, I thing. The other problem is, if the formula is in the beginning of the line – then the line looks to have larger indentation than the others. And in this situation there are no workarounds.
I searched, how to disable this spacing, but it seems to be inevitable. Can you please suggest something?

(deleted as irrelevant by the author)

Hi - Writer applies the “Formula” frame style to formulas. You can edit to change spacing (Wrap tab):

Thank you very much! This is exactly what I’m looking for!

Do you know how to change this default 0.08in of spacing to zero? With this solution, I have to manually change the spacing for each and every formula in my document.

To make this the default behavior in LibreOffice for all documents, you should make a new “Document Template” (files with .ott suffix), and set it as the default template for LibreOffice. This is done from Files → Templates menu: Open an empty document, change the Formula style as described above, save it as a template, and go to template manager and set your new template as default.