Gemini Advanced got it right on the second attempt. On the first attempt it mistakenly thought that the problem was a tic-tac-toe game, but after I told it that it was an IQ test I got the correct answer.
I also changed the wording of the prompt slightly:
Here are some patterns:
...
Which of the follwing answers shows the correct substitution for the last pattern (the one with the ???)?
...