Games are interesting because games copy each other incessantly but almost never sue over copyright.
The actual source code and art would clearly fall under copyright, but not the gameplay. So when PUBG discovered the popular battle royale genre, everyone rushed to copy it and now we have Fortnite, Apex Legends, Call of Duty Battle Royale, etc. When Dota was popular, it spawned tons of clones. Minecraft spawned tons of clones. In some cases where the clones are too similar, the original creator may have legal grounds for suing, but they seldom do so.
Short of blatantly stealing assets from another game, it's hard to get in trouble over another game's copyright.