one of the classic cases of this occurred in the series Deadwood. they use a lot of modern swear words. while these words might have been in use, they were probably not the common swear words. this article has a good discussion and points to references.
https://nymag.com/nymetro/news/people/columns/intelligencer/n_10191/
the series Deadwood is only from 1870+ and the words have changed.
notably, they say that there was more profanity while today there is more vulgarity.