Since #34897, a flush in ConnectTip() can report a block before the index receives BlockConnected for it. The locator check in ChainStateFlushed() then skips saving the index tip. On a pruned assumeutxo node, repeated skips can leave the saved tip so far behind that the index needs blocks that were pruned by the time it restarts after background validation.
This PR uses Fabian Jahr’s two commits. The first adds a unit test that reproduces the skipped write. The second removes the locator check and updates the test to verify the saved tip after reopening the index. Commit() allows the write only if the index tip is at or is an ancestor of the chainstate’s last flushed block.
Fixes #36939