> Currently, the latest index state may not be committed to disk on shutdown.
> The state is committed on ChainStateFlushed callbacks and the current init order unregisters the indexes as validation interfaces before the final ChainStateFlushed callback is called on them.
This is a backport of Core [[https://github.com/bitcoin/bitcoin/pull/17897 | PR17897]]