There's a possibility for taking this fight. Would be a great learning experience in politics regardless of outcome, if they want to subject themselves to the pressure and discomfort. But might not be worth it. Would require navigating both political conflict and a proper negotiation of terms afterwards, if successful, to ensure they get recognition for their work and also monetary rewards. Important to try to disconnect feeling of self-worth from the outcome and try to treat it as a high-stakes game. The default is quitting or getting fired, unlikely to do worse than that regardless.
OP's technical accomplishments remains on their CV, and this has probably been a great learning experience from that perspective regardless. There's something to be said for standing up for one's self-respect in taking a fight like this rather than be pushed out without trying to defend oneself, but it's a rough process and might or might not be worth the pain. Depending on circumstances and motivation.
OP should step to the founders no doubt. Just tell them what he or she built and that teamlead X is forcing her or him out. If they want to keep you they need to decide in a reasonable timespan to be decided by themselves. Starting interviewing elsewhere anyway.
Assuming it's a 'she' is also a form of automatically mis-gendering someone.