Is there a name for arguing with other people in one's mind? Is there a name for the phenomenon of arguing with other people in one's mind?
I don't mean simply replaying memories of arguments (or modifications thereof), although that may fall under this too but also predicting arguments and debating people preemptively in one's imagination.
I'm not aware of a term specifically for this phenomenon.

Having a conversation in one's head has been termed dialogic inner speech by several researchers.  You didn't mention if the people you are arguing with reply back - if they don't, then it's just regular (monologic) inner speech.

One common function of inner speech is sometimes referred to as speech rehearsal - ie, where one might practice a monologue or dialogue (eg, debate) in their mind ahead of time.

In a more pathological context, repeatedly looping through a conversation in one's head can be a form of rumination, and simulating a future argument could be considered action rumination if it is a reaction to a recently failed argument.