Trademarks don’t stop new creative works. They can only stop misleading use (like using the name to refer to something else).
So if Holmes is trademarked I can’t make “Evil Sherlock Holmes Supervillian Movie” but I could write a story wherein he is his usual self.