This is a well known (long standing) issue. Documented in the code base in commit eea02be70ee37b845f2719b3c08e5baf4b6f51f6.

Countless intermittent sanitizer warnings can be attributed to it.
if (g_chainstate && g_chainstate->CanFlushToDisk()) {
            g_chainstate->ForceFlushStateToDisk();
        }
    }
    
    
    GetMainSignals().FlushBackgroundCallbacks();
    
    if (g_txindex) {
        g_txindex->Stop();
        g_txindex.reset();
    }
    ForEachBlockFilterIndex([](BlockFilterIndex& index) { index.Stop(); });
    DestroyAllBlockFilterIndexes();
    
    
    
    
    
    {
        LOCK(cs_main);
        if (g_chainstate && g_chainstate->CanFlushToDisk()) {
            g_chainstate->ForceFlushStateToDisk();
            g_chainstate->ResetCoinsViews();
        }
        pblocktree.reset();
    }
    for (const auto& client : node.chain_clients) {
        client->stop();
    }