'Python Tkinter - I'm having black rectangles while loading window using custom theme

I'm trying to create custom theme for ttk, for that I tried using full python and tcl but with both I have same problem, for few seconds when I open window/reopen with taskbar widgets with customs images are black. How can I avoid that or improve it? Thanks!

bugged image

normal image



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source