Did Billy Dee Williams ever get any serious flack for playing Harvey Dent?
Since he was playing a character who was race-switched. There wasn't any social media back then so it was harder to gouge people's reactions to the changes that were going to be made and whom was in the movie (we all know about the initial controversy over Michael Keaton's casting as Batman).
I do recall on the special edition DVD, Billy Dee Williams did bring up the race issue. He said that something along the lines that if he could play the character to the best of his abilities (he said that he tried to model his interpretation of Harvey Dent on Adam Clayton Powell) then hopefully people would overlook his ethnicity. I don't think that people complained that much about Laurence Fishburne playing Perry White in Man of Steel since Fishburne is such a great actor with a commanding presence.
https://www.youtube.com/watch?v=hP6SB7BH3W4
I think that Marion Dougherty was really influential in casting Williams as Harvey Dent. She had also worked with Danny Glover on Lethal Weapon and she I believe, had to convince the director, Richard Donner that he was capable of playing Roger Murtaugh, even though the character was originally envisioned as a white guy.
https://www.youtube.com/watch?v=WwB_5yxhsWk
And to be fair, Harvey Dent really isn't a comic character that's inherently defined by his ethnic background like say, Black Panther. And it isn't like what they awkwardly did with the 2015 Fantastic Four movie, where they had Michael B. Jordan (a black actor) play the traditionally Caucasian Johnny Storm, yet they still had a white actress (Kate Mara) play his sister, Sue. And I suppose that since Harvey Dent was a relatively obscure character (this was really his first major appearance in media outside of the comics, since Two-Face wasn't a part of the Adam West series from the '60s) at that point it would've been much easier to get away with race-switching then say with Alfred or Commissioner Gordon.