Of course players sitting around the same table playing a game are going to be saying stuff that sometimes the characters being played by the players right next to them are not aware of. As a GM, there are a few ways to deal with this:

You can enforce strict rules and separate the players so they can't communicate when their characters are out of contact.

You can insist that players write down anything that should be secret from other characters and engage in note-passing to communicate with the GM.

You can trust the players to faithfully separate player and character knowledge, and play their characters as if they don't know what the other players are thinking.

Use every piece of player knowledge you can get your hands on to your own advantage.

Transcript

As a player, there is just one way to deal with this:

[SFX]: Pew Pew

[SFX]: Kabooom!

R2-D2: All right! Another hundred droids and I can level.

Anakin: Is that what you're doing? What about our mission?

R2-D2: Next level I can get Enhanced Environmental Sealing. I'm obviously not going to infiltrate an enemy HQ without that.

Anakin: It's so touching that you're into self-improvement.

{scene cuts to Jar Jar on the battlefield, surrounded by droids}

Captain Tarpals: Wesa done for, Jar Jar.

Jar Jar: Not yet! Here's da plan.

Jar Jar: Artoo issa very smart droid. Hesa can use da Trade Federation computers to tell da droids to stop working!

Captain Tarpals: But how yousa gonna tell him that?

{scene cuts back to R2-D2, shown in a moment of silence}

R2-D2: Oooh! I just had a brilliant idea! I hack into the Trade Federation's computer systems and spoof a shutdown command for the droid army!

R2-D2: Oh look, it's my best skill. I roll 10001.

GM: Er... There's no way R2 could know what Jar Jar thought of.

R2-D2: Do I sound like I'm talking in character?