As others have said, if you post anything on the Internet, you’re gonna have to make your peace with the fact that someone could repost it, otherwise you’re unlikely to sleep ever again. It’s basically impossible to prevent someone from downloading and reposting, which sucks, but that’s how it works.
Major multi-billion-dollar corporations have completely destroyed their customer relations trying to find a way to prevent this, but the natures of electronics and the Internet are both fundamentally like unchained beasts. If you or someone else on this forum were to figure out how to prevent this, then that person would be ahead of corporations with thousands of employees.
It’s more likely, however, that people just know who made a game (because they remember you hyping and posting here), as well as where it was originally posted (especially if you allow archivers to save and preserve your work, and document it as part of the larger culture). If this is allowed, then most attempts to maliciously repost your work will likely be met by enthusiasts calling them out for it. A lot of malicious reposters will collapse like wet paper when met with any kind of backlash, as they tend to be deeply-insecure people.
Also, if an archive can preserve your work, then everyone who frequents the archive will know who made it, and where to find the original source.
Generally, posting a copyright notice (I recommend Creative Commons, as @HanonO says) is enough to deter most people, even if you don’t legally file, or are unable to take them to court. You should also know that if you use Creative Commons, you’re locked into that specific license once you upload, and attempts to change the license won’t hold up in court (if you need to go to court). So, uh…choose your CC license wisely lol.
If you’re not prepared (for any reason) to make your peace with Internet reposters, then I might suggest organizing a private friend group of IF enthusiasts and sharing your work with them specifically, as you know you can trust them. I know people who have gone this route; it’s perfectly valid.
The Internet is just really, really big. I only use my name on this forum because I have a really bad defiance complex, but also because various civil offices have already put my name all over the web already, and I also know how hacking and cybersecurity work, and understand the risks involved.
What I’m trying to say, is: Posting your work online has risks. Don’t let the larger population make you feel like your only option is to post online.
EDIT: For example, if someone tried posting a “new” game called “The Baker of Shireton”, and another ifdb frequenter saw it, they might say “Heyyyyyy isn’t that actually a game by @HanonO, you reposting rapscallion?? There’s even an ifdb page for it!”
Then the reposter would have to figure out how to convince several people–who are familiar with Hanon’s work–that the reposter is actually a time traveller, and that never works out.
EDIT 2: Also worth stating: I’ve been making music for 10 years, and only ever saw 1 repost, and it was for a remix I did; not even a wholly-original song. It’s really rare, especially when my experience is in something like the music scene, which has a ton of cutthroat people who chase fortune and fame. The IF community is so much more kind, respectful, and relaxed, if my time on this forum is any indicator.