Here is a proof without any discretization. Let $\chi_S$ be the indicator function of $S$. Consider
$$I(S)=\int_{[0,1]^2} (2\chi_S(x,y)-1)(x+y-1).$$
We can show that $I(S)=I(S^*)$ where $S^*=\{(x,y)\in[0,1]^2:x+y\geq 1\}$:
$$
\begin{align*}
I(S)&=\int_0^1\int_0^1 (2\chi_S(x,y)-1)(x-\tfrac 1 2) dydx+\int_0^1\int_0^1 (2\chi_S(x,y)-1)(y-\tfrac 1 2) dxdy\\
&=2 \int_0^1\int_0^1 (2\chi_S(x,y)-1)(x-\tfrac 1 2) dydx\text{ (by symmetry of $S$)}\\
&=2 \int_0^1(2\int_0^1 \chi_S(x,y)dy-1)(x-\tfrac 1 2) dx\\
&=I(S^*)
\end{align*}
$$
using$\int_0^1 \chi_S(x,y)dy=\int_0^1 \chi_{S^*}(x,y)dy$ for almost every $x$. (In fact $I(S^*)=1/3$, but that is irrelevant to the proof.)
On the other hand,
$$|(2\chi_S-1)(x+y-1)|=|x+y-1|=(2\chi_{S^*}-1)(x+y-1)$$
so, taking absolute values:
$$I(S)\leq \int_{[0,1]^2} (2\chi_{S^*}-1)(x+y-1) = I(S^*).$$
But we know $I(S)=I(S^*)$, so
$$(2\chi_S(x,y)-1)(x+y-1)=(2\chi_{S^*}-1)(x+y-1)$$
almost everywhere. Since $x+y\neq 1$ almost everywhere, this forces $\chi_S(x,y)=\chi_{S^*}(x,y)$ almost everywhere, which implies that $S\triangle S^*$ is a null set.
Again the symmetry isn't really necessary - the proof could be modified to only use that the $x$ and $y$ marginals are correct.