It's a translation through time. If you don't want your characters to come off as racist shitbags, they probably shouldn't use the n word in 2023.
It’s not like these are real people who will be voting in the next election. They’re just brushstrokes in a painting.
Almost any reader today will be unable to see characters as they were meant to be seen, or as someone would have seen them at the time of writing. Language and society has changed too much for that to make sense.