The problem with my sentence is because it's a question? Or is it because I used a passive construction in the second part?
I'm not sure. You want to know why I called the first example wrong and the second one right? I've changed my mind. It's not grammatically wrong. But there's a semantic problem.
"Have you ever been watching a soccer match when your wife has been swamped with cooking for Thanksgiving Day?"
I think it has to do with 'when' v 'while'. That is, when was she swamped with the cooking? I would say that she was swamped with cooking before you were watching the soccer match. She did not become swamped while you were watching the soccer. Her tasks were set out for her long before Thanksgiving Day. "She was swamped with cooking while you were watching soccer." and "You were watching soccer while she was swamped with cooking."
There's also the complication of whether "swamped with cooking" is an adjectival phrase or a past participial phrase. Given that she did not become swamped while you were watching soccer, it's an adjectival phrase.
So, from my perspective, the red sentence means something like, "Have you ever been watching soccer when someone came along and swamped your wife with cooking?" As bhaisahab said, it's grammatical, but its not usually what a person would mean.
Your second example:
What if a cop talks to the nanny than comes up to another officer and says ''"I just spoke with the nanny. No sign anyone's been following her when she's been out with the baby."
In this one, 'when' has to mean 'while'. If it didn't, it would read, "... when she's gone out with the baby."
The problem with determining whether unlikely sentences are grammatical or not depends to some extent on the meaning. The red sentence is grammatical if it means what it says, but not if it means what you probably think it says. If you give an argument that it's either grammatical or it isn't, then I change my mind. It is grammatical.
"So you've been watching a soccer match when she's cooked lots of food for Thanksgiving Day."?
OR
"Have you ever been watching a soccer match when she's cooked food for Thanksgiving Day?"