Try this, but don't use a docked figure. Just use GETFRAME the normal way, but switch to software rendering of OPENGL. You should still be able to use transparency.
In the line before the getframe command, I inserted this code:
This seemed to solve the problem completely. I'm not sure why it did, but I tried another option the documentation offered which was:
and this gave the original issue. I have an OpenGL graphics card, so perhaps its the drivers? Matlab doesn't like them?