We said that the sentence will change its meaning based on which verb group the adverb is closest to.
That's an okay-ish way to describe what's going on in this example, but actually there is a deeper and maybe even simpler rule if you understand the concept of connectors and clauses.
This is a topic for a whole other lesson, but basically the humble, almost invisible word 'that' marks the boundary between two distinct clauses, or parts of the sentence:
- The part about Mrs Fox knowing, and
- The part about Mr Fox trying to think of a way out
If you look at the snippet from this point of view, you'll notice that you can move the adverb around within a clause and the meaning doesn't change (though some positions are clearer or sound better than others).
But the minute you move the adverb to another clause—which in this snippet means jumping over the connector 'that'—then the meaning of each clause changes, as one clause loses the adverb and the other clause gains it.