dealing with racist harassment on chess.com
I hope you report and block the users who harass you. People who get reported by many users are usually warned and muted. There are so many users that chess.com has to rely on user reports to help staff and moderators identify problem users.
I don't think that requiring ID's to register would work since so many users are under the age where they would obtain official ID's. Also, Chess.com is not a government entity and it would be very costly to verify the credentials. I think it would require the elimination of free accounts.
I don't allow any chat when I am playing. That is very effective.