Three routes to sell code
Game source code marketplace: stores, brokers and AI buyers
Updated
A studio can sell code to developers through a store, sell the business on a marketplace, or license the repository to an AI buyer while keeping it.
Stores that sell code to developers
SellAnyCode lists whole game sources, including Unity games, and CodeCanyon needs an Extended License where the end user pays for the end product. itch.io asks creators to affirm they have the rights to upload and sell what they list.
Marketplaces for the business
Flippa, Acquire.com and Empire Flippers sell whole online businesses and apps. They suit a studio selling a live game with its revenue, not a repository on its own.
AI buyers that license the code
Mercor licenses the game code and gameplay footage behind shipped games, and its software company listing asks for private repositories that have never been public. Turing's Project Lazarus works from a copy so the company keeps running, and ZENOS Data clears every grant with the IP holder before delivery.
Source: Where game source code is sold or licensed
Before any of these, check what the engine allows on sell Unity project.