That happens all the time if the previous discussion was about the other subject you don't want (tech in this case): LLMs (not just Gemini) go out of their way to reconcile the two topics.
As an example at some point I asked about the little shrooms people (the tiny people people do hallucinate all mostly the same when eating a particular mushrooms) to a LLM and forgot to begin a separate discussion and asked... About the root "-trinsic" in "intrinsic" and "extrinsic" and the city of "trinsic" in the Ultima game. Oh man... The LLM went wild. I totally forgot I asked about the little shrooms people hallucination but the LLM didn't forget and went totally nuts.
I think you'll get better result if you launch a new discussion and specify "Context: history" or "Context: cooking". Once it goes off the rail, asking it to "not do that" ain't really working: by that point it's just gone, solid gone.
You can give it additional instructions in the settings, but you have to be careful with that too. I've put my tech stack and code preferences in there to get better code examples. A while later I asked it about binary executable formats and it started ending every answer with "but the JVM and v8 take care of that for you."
Which is both funny in an "I, Robot" kind of way, and irritating. So I told it to ignore my tech stack. I have a master's in CS and can handle a bit of technical detail.
Turns out, Gemini learned sarcasm. Every following answer in that thread got a paragraph that started with something like "But for your master brain, this means..."
I noticed the "memory" too and it's turned Gemini into a useless syncophant for me, but so subtle that I almost didn't spot it.
The toggle by "Your past chats with Gemini"