In music, someone can sing the same style as another, but if they imitate it to the point that there is brand confusion, where the consumer believes the product came from X when it actually came from Y, that's clearly crossing the line.
Is that actually crossing a line? I'm sure some consumers have thought that rocket league was associated with FIFA, or that studio Ghibli movies were made by Disney. But these aren't widespread issues because we have a robust system of trademarks that draws a clear line: you can't use trademarked names or iconography in a way that causes confusion. But if some people heading Olivia Rodrigo's "good 4 you" think they're listening to Paramore because they have a similar style, that has never been illegal