Agreed. If you're the author and Alice and Bob are the imaginary characters in your example, then you get to decide their gender.
Same as an author who is writing a novel, is free to invent characters and assign gender, sexual orientation, and any other character traits they want.
It's your story, they are your characters. You decide if it's a he, she, xe, or whatever.