There's a small number (~100?) of commercial games that also allow resale through Creative Commons licenses on itch.io. you can use filters like "assets-cc4-by-sa" plus "code-gpl3" to find games like that, but there's a lot of possible license combinations so it's difficult to see all games like that at once. I've also seen a couple of digital commercial games that allow resale but had some other restrictions (e.g. forbidding reverse engineering), from Humble Bundle, if I remember correctly, but in those cases I didn't know that was allowed until after I bought the game, so searching for games like that seems pretty difficult.
Maybe there are games on GOG that allow this too, but I don't know how I'd search for them.