I am not a lawyer, but I suppose if you use your own assets and world, it's not a problem.
Just look at this list https://osgameclones.com/ which barely scratches the surface of clones/remakes of old games. Hell, most of my projects are clones of existing games - my space project is inspired by Stellar Frontier, my racer project is inspired by Need For Speed games (Underground 2, Most Wanted, Carbon), and I have a new project in the works which is inspired by stealth games such as Deus Ex 1 and Rainbow Cell Rogue Spear or Hitman series...
As long as you put your own assets, world and do not copy 1:1, you're probably fine. For instance, my racer has no named/brand cars, just lowpoly squareish bodies... my space game has fairly extensive procedural generation system and the planets actually orbit, which they didn't in the original probably due to performance reasons (it was 1998, after all)... and my new project will probably use procedural generation, too.