Welcome to the forum!
I am a customer as well, with no particular affiliation to Google. You have questions about two different products, be careful to avoid confusion.
The first part is about the Gemini Advanced application (paid service). The relevant passage in the consumer agreement reads (today, it was revised about a week ago):
Heading:
Gemini Apps Privacy Hub
Last updated: May 29, 2024
QUOTE
Configuring your settings
Visit your Google Account to access settings and tools that let you safeguard your data and protect your privacy.
To stop future conversations from being reviewed or used to improve Google machine-learning technologies, turn off Gemini Apps Activity. You can review your prompts or delete your conversations from your Gemini Apps Activity at myactivity.google.com/product/gemini.
Conversations that have been reviewed or annotated by human reviewers (and related data like your language, device type, location info, or feedback) are not deleted when you delete your Gemini Apps activity because they are kept separately and are not connected to your Google Account. Instead, they are retained for up to three years.
Even when Gemini Apps Activity is off, your conversations will be saved with your account for up to 72 hours. This lets Google provide the service and process any feedback. This activity won’t appear in your Gemini Apps Activity. Learn more.
END QUOTE
Reading between the lines, your data is subject to inspection by human reviewers for up to 72 hours when your Gemini Apps activity is disabled. I will hazard a guess that this is so Google can be in compliance with law enforcement requirements. Nevertheless, there is no guarantee that your code will not be reviewed that I can find in the statement.
Moving on to the second part, AI Studio. Your paid plan for Gemini Advanced does not make AI Studio use be “pay-as-you-go”. The pricing page Gemini API Pricing | Google for Developers makes the distinction relatively clear: if you don’t enable billing when using AI Studio, your data will be used to improve the model (you are agreeing to donate the data). If, on the other hand, you enable billing, your intellectual property rights remain intact.
Hope this is helpful.