This is a common practice in shared working spaces. Most people can be interrupted for casual conversation and then get right back to work after that. So, it’s hard for them to realize they might cause a negative effect just by being friendly and sociable.
Instead of trying to get her to remember, come up with something that makes it obvious when you don’t want to be interrupted. For example, I use earphones (sometimes without anything actually playing in them). And I tell people, “When I have my earphones on, I’m in the zone and can’t be interrupted unless it’s an urgent issue that needs immediate attention.”
This way, it’s not a conflict, you’re not blaming others for doing anything wrong, and you’re still allowing for times when being interrupted might be OK (when no earphones are on).
Side note: I usually can’t listen to music while trying to be productive because of my interest in music. But I did discover binaural beats, which is a great way of drowning out background noise and putting your brain into the zone. So, sometimes that’s what I’m listening to in my earphones.