Using JUCE in a Cocoa app

I’m trying to use JUCE in a Cocoa application but I’m running into some problems. If I want to use JUCE for displaying plugin windows and Cocoa for the rest of the app, is there some sort of initialization that needs to happen?

I’m aware of ScopedJuceInitialiser_GUI. I’m running into some strange problems. On Intel Mac, the plugin window is loaded correctly, but on Apple M1, I hit this assert JUCE/juce_mac_CoreGraphicsContext.mm at ddaa09110392a4419fecbb6d3022bede89b7e841 · juce-framework/JUCE · GitHub

Note that things work correctly for built in Apple plugins, the issue manifests only with third party plugins.