Exclude footnotes from replacements

It would be great if I could tell Scrivener to exclude footnotes from compile time replacement.

I am using linked footnotes to document the original form of terms replaced at compile time.

For example:

Should become:

The footnote indicates that “cat” was originally “fox”.

For now, I can use regex replacement to achieve this, but it’s not perfect.

For the quote:

A rule to replace ([^~])fox with $1fox works, but I have to prepend ~ to all my footnotes and remove all instances of ~ after compile. The regex also messes with formatting code, so an italicized “fox” may yield a non-italicized “cat” in the compiled document.