Window size does not change with wrapped VST2 plugins

I am working on an adapter that loads a VST2 plugin an exposes it as VST3. It looks like this:

class WrapperProcessor : public juce::AudioProcessor, public juce::AudioProcessorListener
{
public:
WrapperProcessor(std::unique_ptrjuce::AudioPluginInstance processorToUse) : AudioProcessor(getBusesPropertiesFromProcessor(processorToUse.get())), plugin(std::move(processorToUse))
{
plugin->addListener(this);
}
juce::AudioProcessorEditor* createEditor() override
{
juce::AudioProcessorEditor* ed;
ed = plugin->createEditor();
return ed;
}

bool hasEditor() const override { return plugin->hasEditor(); }
void refreshParameterList() override { return plugin->refreshParameterList(); }

}

// This creates new instances of the plugin…
juce::AudioProcessor* JUCE_CALLTYPE createPluginFilter()
{

juce::OwnedArrayjuce::PluginDescription pluginDescriptions;
juce::KnownPluginList plist;
juce::AudioPluginFormatManager pluginFormatManager;
pluginFormatManager.addDefaultFormats();
for (int i = 0; i < pluginFormatManager.getNumFormats(); ++i)
plist.scanAndAddFile(pluginPath, true, pluginDescriptions, *pluginFormatManager.getFormat(i));

juce::String msg;
auto wrapped = pluginFormatManager.createPluginInstance(*pluginDescriptions[0], 44100.0, 512, msg);
return std::make_unique<WrapperProcessor>(std::move(wrapped)).release();  

}

The VST2 plugin can change the window size for hiding the keyboard.
However parts of void setWindowSize (int with, int height) in juceVSTPluginFormat.cpp never get called.

void setWindowSize (int width, int height)//wird aufgerufen wenn ein tOne2 plugin die fenstergrösse ändert
{
if (auto* ed = getActiveEditor())
{
#if JUCE_LINUX || JUCE_BSD
const MessageManagerLock mmLock;
#endif

       #if ! JUCE_MAC
        if (auto* peer = ed->getTopLevelComponent()->getPeer())
        {
            auto scale = peer->getPlatformScaleFactor();
            updateSizeFromEditor (roundToInt (width / scale), roundToInt (height / scale));

            return;
        }
       #endif

        updateSizeFromEditor (width, height);
    }
}

getActiveEdior() does return a nullptr. Is there a solution for this?