firstly setup an rtpc and you will use to change the sounds you want to change when the window doesn't have focus - e.g 100 window in focus 0 window not in focus ( 99-1 fades between the two ) - this might be as simple as controlling the master bus volume.
secondly realize that now just need to set this rtpc ( with a fade ) to either 100 or 0 depending on if the window has focus.
lastly you need to find the point in your engine where you can detect when this changes most have this for some other reason so dig around - you might need to add this, in which case it will depend upon the platform for windows start by looking at WM_SIZE
https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-size - hopefully its clear that this part is nothing really to do with wwise but more of a general engine thing to call code that wants to run when the window comes and goes.
hope that helps
-
dan.murray