I don't know the exact answer, but I can derive a hopefully reasonable upper bound.
Consider a line of sight in the direction $\alpha$. By the symmetries (dihedral group of order 8) we can assume that $0\le\alpha\le\pi/4$. Let $\rho=\tan\alpha$ be the slope of this line, so we are looking along the line $L:y=\rho x$.
Pick an integer $N$ such that $N-1>1/r$. The line $L$ intersects the vertical lines $x=i$, $i=1,2,\ldots,N$ at points $P_i=(i,i\rho)$. [Edit: A silly but potentially confusing typo was here as I had written $N\rho$ in place of $i\rho$ ] Let us consider the fractional parts of the $y$-coordinates of these points. For the point $P_i$ this is $y_i=\{i\rho\}=i\rho-[i\rho]$. The numbers $y_1,y_2,\ldots,y_N\in [0,1)$. Let's put these $N$ numbers into $N-1$ buckets according to the value of $[(N-1)y_i]\in\{0,1,\ldots,N-2\}$. By the pigeon hole principle at least two number, say $y_k$ and $y_\ell$ end up in the same bucket. Without loss of generality we can assume that $k>\ell$. Then $|y_k-y_\ell|\le1/(N-1). But we also have $ y_k-y_\ell\equiv y_{k-\ell} \pmod1. $ (or $y_k-y_\ell$ differs from $y_{k-\ell}$ by an integer). Therefore the point $P_{k-\ell}$ is within distance $r$ of a point of $\mathbf{Z}\times\mathbf{Z}$. Obviously here $0.
We have shown that this line will get blocked at a distance at most $N\sqrt{1+\tan^2\alpha}\le \sqrt2 N$. Here $N=1+\lceil(1/r)\rceil$, so we have shown that the maximum distance $d=d(r)$ that we can see satisfies the inequality $ d(r)\le\sqrt2\left(1+\lceil\frac1r\rceil\right). $