You’re right; it’s almost certainly copyright infringement, if a company wanted to take it to court. But of course, so is fanfiction. So is fanart. That we treat fangames differently is a real testament to how they’re seen as more of a commercial product than an art form.