A queen beats a lone rook. There are only two escapes: stalemate, or winning the queen. This one is the second case, and it works only if the rook gives check on every move.