Alpha Background on MacOS

I am working on an application that creates windows with a translucent background, using SetBackgroundColour() with an RGBA colour value. This works fine most of the time, except that on older MacOS versions (High Sierra & older), sometimes (within the same session) when a window is shown, the alpha channel will be ignored and the background will be filled with a solid colour. Is there a workaround for this? The background fill (I assume) is done in the default paint event handler, is there a way to disable that and override with my own alpha fill?

Please create a small runnable sample app so we can see what you are trying.