I make sure that all my projects, commercial or not, are public and open-source the moment I start working on them. I really wish more indie devs would do this too!!!
It takes nothing to set up, you don’t have to develop any modding tools, it encourages you to document your codebase so others can use it, people could potentially help fix bugs, it keeps your game alive forever since eventually the .exe is gonna stop working on newer OS and someone can rebuild it, and it doesn’t mean you’re giving out free copies!
The codebase is public, but the art assets stay with purchasable copies. As long as you keep those separated, people won’t be able to make a buildable .exe until they buy the game, but everyone is still able to view, work, and document on the codebase for free.