Yes. Licensing the code is separate from selling the business. AI labs license a scrubbed copy of the source and its history for training. Your product, customers, domain and revenue stay with you, and you keep full commercial use of the code.
That makes it a fit for live SaaS products, for SaaS side projects that stalled, and for products that were shut down. B2B tools are especially useful to labs: billing, permissions, integrations and migrations are exactly the production patterns they want to see.
Will licensing the code affect my customers?
No. Nothing is deployed, published or changed. Buyers receive a scrubbed copy of the repos for training, with secrets and personal data stripped, and never touch your servers, databases or customer accounts. Licenses are not exclusive, so you remain free to keep selling the product and to raise money on it. Check any investor or customer agreements that restrict use of the code before you submit.
If the SaaS was a side project, the same rules apply as for any personal code. Check that your employment contract did not claim it, and keep the history as it is. Small SaaS products with a few years of commits often land in the typical band.