It's not too hard to show that for all $f\in L^1(\mathbb{R})$ and for $g(x) = x-\frac{1}{x}$ we have $\int_{\mathbb{R}} f(g(x))dx = \int_{\mathbb{R}} f(x)dx$:use the substitution $y = x - \frac{1}{x}$ and split the integral in two parts: $x<0$ and $x>0$. On one of them make the choice $x = \frac{y + \sqrt{y^2 + 4}}{2}$, on the other $x = \frac{y - \sqrt{y^2 + 4}}{2}$ and add the resulting integrals.
The existence of even one function $g(x)$, such that the above works is astonishing. Are there other choices of $g$, such that $\int_{\mathbb{R}} f(g(x))dx = \int_{\mathbb{R}} f(x)dx$ for all $f\in L^1(\mathbb{R})$?
Edit: $g(x) = x + a$ for any a would be a solution, but I was wondering if there are more complicated $g$ which work, or if $x - \frac{1}{x}$ is just a single example.
The set of all such functions is closed under composition. As a result, all the functions $g^k$ (in the sense of composition) work.
E.g. $$g^2(x)=x-\frac1x -\frac{1}{x-\frac1x}$$
Adding to that the fact that you can also compose them with affine functions of slope $1$ (lisyarus' answer) yields already a pretty large class.
Incorporating @J.G.'s comment, one gets for instance all rational functions of the form $$\frac{x^2+ax+b}{x+c}$$ with the only requirement that $b<c^2$ ($a$ and $c$ are arbitrary).