JUCE 4 to JUCE 5 having strange issues with standalone plugin

As a reference have also a look in this thread: