Problems with Stereo Rendering on MacOS with Qt UI

So for the past 3 weeks I have been able to use Stereo Rendering on my Macbook running Catalina. However, some days ago it started acting up and whenever I use it with a button click it doesn’t render in the Qt frame but instead it opens up a Cocoa window with the render on it. But the interactions still work on the frame and new Cocoa window. When removing “self.vtk_widget.GetRenderWindow().Finalize()” it works as it should but gives the following error message “Requesting a StereoCapableWindow must be performed before the window is realized, i.e. before a render.”

This is how it should look:

But this is how it looks instead:

self.vtk_widget.GetRenderWindow().Finalize() 
self.vtk_widget.GetRenderWindow().StereoCapableWindowOn()
self.vtk_widget.GetRenderWindow().SetStereoRender(1)
self.vtk_widget.GetRenderWindow().SetStereoTypeToAnaglyph()
self.vtk_widget.GetRenderWindow().StereoRenderOn()