Do you perhaps inadvertently have a tick in the option at Tools | Options... | LibreOffice | Accessibility | Options for high-contrast appearance | Use automatic font colour for screen display? If so, the text will remain in a high-contrast colour - black if the background is light - in the normal editing display, but will nevertheless be marked as the chosen colour and will still print or export as PDF correctly.
If you also have "Use system colours for page previews" ticked, Page Preview will also be affected; otherwise Page Preview will show the correct colour.
I trust this helps.
Brian Barker