Strange behavior of custom wpf windows

Hi all. Rhino 6 only while using it in windows 10( In windows 7 everything is ok).
I have a command that opens a wpf window with the following lines:

my_form my_form_stack= new my_form();
new System.Windows.Interop.WindowInteropHelper(my_form_stack).Owner = Rhino.RhinoApp.MainWindowHandle();
my_form_stack.Show();

Everything is good if i don’t open grasshopper. If i open grasshopper, after closing it , i run my command to open “my_form_stack” and i can only see a whyte window.
You can see it in the following video
https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/a/f/afb20e4b2e5722ae3a520324d224059f7cac09b6.mp4
Thank you if someone knows what is happening.