I think the best way is a combination of three things.

1. Keep the main WoW always on top.
2. Punch a transparent hole in the main WoW so you can see the background WoW's buttons through the hole.
3. Turn on "active window tracking" also known as "activation follows mouse" or "X-mouse."

With that combination, when you slide the mouse over the hole, the background WoW gets the focus but the foreground WoW stays physically in place. When you slide the mouse back, the foreground WoW has the focus again. Here's how to do these three things with HotkeyNet:

Code:
<Hotkey F1>
<TargetWin "World of Warcraft">
<SetWinRegion 100 100 200 300>
<SetActiveWindowTracking on>
<AlwaysOnTop on>