VST Host - how to unload plugin

I have a VST host where I’ve loaded a vst3 plugin into an AudioProcessorGraph and I would like to be able to unload that vst3 and delete the file programmatically - this is for an autoupdate, I’m essentially replacing the file with a new one I’ve downloaded from an s3 bucket. I’ve tried every combination of command I can think of and despite it all the file still mysteriously is loaded into memory and the file is impossible to delete.

I’m sure there’s something basic that I’m missing but I’m stumped on this one… any ideas?

Here’s my latest shotgun style approach to this.

Edit: I’m in the messageThread right now, would this have an impact? I’ve also tried removing all the connections first, this also is not working.

Edit2: This only happens on Windows, I have no issues on mac…

void AudioManager::releaseResources()
{
    if (ed != nullptr)
    {
        delete ed;
        ed = nullptr;
    }

    deviceManager.removeAudioCallback(&audioCallback);

    bcNode.reset();
    graph->clear();
    graph->releaseResources();
    
    delete graph;
    graph = new AudioProcessorGraph;
    
    bcNode = nullptr;
}