Exception when TopMost is set in a child window
Describe the bug
If the child window is set to TopMost and the main window is closed with the child window open, an exception is raised.
Steps to reproduce
1.Open the main window and press [OpenChildWindow]. 2.main window active and close it. 3.An exception will occur. https://github.com/zerodev1200/MetroTopMostIssueSample
Tip: If you delete Topmost="True" in SubWindow.xaml(child window), the exception will not occur.
Expected behavior
The window should close without raising an exception.
Actual behavior
System.ArgumentException: 'E_INVALIDARG'
Environment
MahApps.Metro version: v2.4.9
Windows build number: Win10 21H2
Visual Studio: 2022 17.0.5
Target Framework: .Net 6
Screenshots

Can't reproduce this on Windows 11. Could you attach the full stacktrace? Or try the MahApps.Metro version from https://github.com/batzen/MahApps.Metro/tree/features/ControlzEx6 that version uses the next ControlzEx version 6.0 which should not expose that kind of issues. At least we hope so.
This is fixed in latest source with latest ControlzEx pre version.