Background colors

Setting:
tools–> options → LibreOffice Appearance → LibreOffice Themes Automatic (that is dark)

I would expect black background, on the contrary it is two-colored, black and white, as in the attached picture.
I am asking why it is so.

while setting
tools–> options → LibreOffice Appearance → LibreOffice Themes Light
Backgroud is uniformly white, as expected.

exported pdf file has white background in both cases, as expected.

You must make a distinction between screen appearance, where “themes” play an important role, and final document formatting, where only styles are takien into account.

Dark themes bring with them a lot of trouble, implying a “transformation” to cope with contrast inversion (usually text prints black on a white sheet; black background calls for forcing text to white).

As long as the style parameters (related to colour) are in Automatic state, everything works fine. However, if you force a colour attribute, either in a style or with direct formatting), this attribute is not fixed, no matter what happens in your UI.

In the screenshot above, it is likely you added a white highlight in a character style or manually.

I see also that you save .docx. In this format, all styles (except paragraph ones) are replaced by direct formatting (because there is no such style in DOCX). So hunt for direct formatting (this will be very tedious compared to managing a document through styles).

It looks also you handle your document completely manually, as shown by active Default Paragraph Style. You should work in .odt native format and use styles extensively to ease your work.

PS: when asking here, always mention OS name and exact LO version (because of subtle differences between platforms) and save format (most tips are only valid for .odt).