OpenGL Reaper windows jassert on close issue

In the past few years I once in a while tried to render the plugin editor in OpenGL like this:

in the editor constructor I say:
//mOpenGLContext.attachTo (*getTopLevelComponent());
in the editor destructor I say:

This seems to work quite well in several hosts on both Mac and Windows except for the combination Windows + Reaper…

If I close the plugin window and then quit Reaper all works perfect but if I have the plugin window open and quit Reaper I get this jassert in juce_opengl\opengl\juce_OpenGLTexture.cpp line# 169

jassert (ownerContext == OpenGLContext::getCurrentContext());

A breakpoint instruction (__debugbreak() statement or a similar call) was executed in reaper.exe.

I found some threads related to this issue where similar things where probably resolved. However this particular issue seems to remain unresolved as far as I can tel…

If I should be doing something differently or if there is a solution I overlooked than please let me know.