If n and m are even, then there is a middle square on the grid. Let Juku paint the middle square any color on the first move. From now on, each of Juku's moves should mirror Miku's last move relative to the center of the grid. If before Miku's move the position is symmetrical with respect to the center of the grid, then Juku can certainly respond symmetrically, and before Miku's next move the position is again symmetrical with respect to the center of the grid. Therefore Juku always wins.
If n or m is even, then Miku can mirror Juku's last move with respect to the center of the grid in each of his moves, but with the opposite color. Then, before each move by Juku the unit squares symmetrical to the center are of the opposite color. So if Juku can make a move, Miku can respond symmetrically to the center. Consequently with this strategy Miku wins. It follows that on 2023×2023 grid Juku can win for any moves of Miku, on 2023×2024 and 2024×2024 grids it is not always possible.