Lock up when going fullscreen on Big Sur

You know what’s so strange about this bug. If i instead of filling 500 rects i draw a text randomly on screen 5000 times the fullscreen behaviour still works, the UI seems to be struggling much more than with the rects (which is expected) but it does properly switch to fullscreen mode eventually.

for (int i=0; i<5000;i++)
{
    g.setColour(juce::Colours::red);
    //g.fillRect(getLocalBounds());
    
    juce::Random rnd;
    int x = rnd.nextInt(juce::Range<int>(0, getWidth()));
    int y = rnd.nextInt(juce::Range<int>(0, getHeight()));
    g.drawText("Testing", x, y, 200, 200, juce::Justification::topLeft);
}

I paused the process to look at the call-stack in Xcode. The call-stack is small but shows OSX is busy performing a CGSFillDRAM64.

Doing a simple search this is the topic that pops up:

Does the above ring any bells to anyone?