When I learned measure theory, sets of measure zero begin to perplex me somewhat, especially the Fubini Theorem. My method to deal with them is to consider equivalent classes of measurable functions instead, where the equivalent relation refers to being equal almost everywhere. However, when I learn dynamical systems, sets of measure zero perplex me more.
For instance, in the book ergodic theory of Petersen, in section 4.1.A, the following proof:
Firstly, $G_x$ may not always be in $L^2(X)$. But we can modify $G$ by letting $G_x=0$ if $G_x \notin L^2(X)$. But a new problem appears. To make $T$ be an isometry, we need $G$ be genuinely $T \times T$-invariant, i.e., $(T \times T)G=G$. I know that for an almost everywhere $T \times T$-invariant $G$, we can modify $G$ such that $G$ is genuinely $T \times T$-invariant. But for above $G$, if we modify $G$ again, can the new $G$ satisfy that $G_x$ are always in $L^2(X)$?
Maybe we can modify $G$ such that it satisfy the two conditions, belonging to $L^2(X)$ and $T \times T$-invariant. However, the emphasis is not it. In fact, I often be troubled with these problems. I know that these are trivial details and many powerful results in measure theory benefit from the introduction of sets of measure zero. But, to be rigorous and to read fluently, are there some methods to deal with sets of measure zero? I don't want to be trapped in problems of sets of measure zero and I want to appreciate the beauty of mathematics directly without bother of sets of measure zero.
Thank you very much!

You don't necessarily need to modify $G$, another option is to ignore sets of measure zero. I don't know how the proof you are citing continues after the snippet that you provide, but you could decide to define $d(x,y)$ a little differently: let it be given by the formula provided as long as both of $G_x,G_y$ are in $L^2$; and let it be zero otherwise. The subset of all $(x,y) \in X \times X$ where you need to define it otherwise is a measure zero subset.