One way would be to make a simple regex substitution with a replacement function;
import re
my_dict = { "Dog": "dog", "Cat": "cat" }
skip_words = set(["The Dog", "The Cat"])
result = re.sub(
f'({"|".join(skip_words)}|{"|".join(my_dict.keys())})',
lambda x:x.group() if x.group() in skip_words else my_dict[x.group()],
"The Dog is Dog Dog Dog..."
)
print(result)
>>> The Dog is dog dog dog...
A short explanation;
f'({"|".join(skip_words)}|{"|".join(my_dict.keys())})',
Creates a regex string to match on, consisting of all skip words (first) and then all replacement words. The regex will match on any of these.
lambda x:x.group() if x.group() in skip_words else my_dict[x.group()],
A function that returns the word(s) itself for words in skip_words or the looked up version from my_dict for any other matched words. That means, the skip words are not replaced, the other matches are.
Note that I placed the skip words in a set for easier and more efficient lookup.