I guess my answer would depend on which context it is used. If it's an offensive stereotype or blackface then, of course, it's not acceptable, and if the colour/ancestry of the character they are playing is intrinsic to the story then it wouldn't make sense either. But outside of that I personally don't see an issue with different races playing any character they see fit as long as it's in a respectful manner.
The same way that I think it pretty well agreed that Samuel L Jackson kills the role of Nick Fury (who was depicted as a white man in the comics), Morgan Freeman's portrayal of Red in the Shawshank Redemption (an Irish character in the book) is iconic, and more recently Zendaya as Mary Jane Watson (a white character in the comics) is perhaps the best portrayal to date (in my opinion anyway).
Of the 3 examples I mentioned earlier I have seen Dakota Johnson voicing Madame Web in Into The Spiderverse and from what I remember she wasn't making fun of her character disability in that role. I haven't seen the other 2 so I can't comment on those I'm afraid.
As an fyi, I'm not bringing this up to cause any friction, I'm generally interested to hear peoples stances on it.