You have to look at why race-swapping is a thing. For the most part it's because Hollywood execs heard people want more representation and they decided turning random characters black/brown would do the trick. You also have to consider what the purpose of "representation" is.
It could be to include differing view points that are built upon the distinct experiences and beliefs that come from being a part of a specific culture, group, or belief system. This is more in depth and would require some research and nuance if the writer is not from the culture/group they're trying to write. Or it could just simply be to show the wide variation in demographics of the setting.
Either is fine, but the sort we most often see on shows and movies is usually an attempt to cash in on the need for representation. That's not fine and just creates very surface level "representation". The best thing to do would be to either adapt stories that already have a wide array of characters or create new stories with diverse characters.
Mostly, I don't care about race swapping, though it seems pointless a lot of the time. Sometimes it does result in some good casting choices, like Samuel L. Jackson as Nick Fury and sometimes it's a dogshit decision like Snape in the new HP show. I was already boycotting that franchise, but dang, they're making it real easy not to watch.