If you put an "anchor element" (something, that you can cross reference) inside a section (mark->insert section) and then revert the action of inserting a section, all references to that anchor will become invalid.
1. Create a numbered element (e.g. a numbered list)
2. Create a cross reference to that numbered element
3. Select everything and execute `Insert`-> `Section...` -> `Ok`
4. (Everything gets put in a section)
5. Press Ctrl+Z to revert the inserted section
6. Mark everything and press F9 to refresh all references
7. ACTUAL: The references became invalid
7. EXPECTED: References don't change / don't become invalid
The actual result is irreversible. All references are marked as "Error. Reference source not found". It's impossible to easily restore references except, if an older version of the document exists.
I confirm it with
Version: 126.96.36.199 (x64)
Build ID: dcf040e67528d9187c66b2379df5ea4407429775
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
After step 5 content of cross reference gets lost