How to maintain or restore widget focus on window focus loss/return?

How can I make sure that when the game loses its active window status, the game does not lose the widget’s voice or that it is restored when the active window status returns?