In the canonical quantization, one assumed the condition that the field $\phi(x)$ vanished at both space and time infinity. However, in the path integral formalism, thought the field $\phi(x)$ was assumed to be vanished at $t\rightarrow \pm \infty $, it wasn't assumed to be so in the spatial direction, i.e. part of the strength of the path integral in the non-perturbative region.
Thus, consider the following equality which hold in the canonical quantization $$\int dx^4 \partial ^\mu \phi(x) \partial_\mu \phi(x)= \int dx^4 \phi(x) \partial^2 \phi(x)$$ through the integral by path.
However, in the path integral formalism, $$\int dx^3 \int dy \partial_y \phi(x) \partial_y\phi(x)=\int dx^3 \phi(x)\partial_y\phi(x)|_{y=-\infty}^{y=\infty} -\int dx^4 \phi(x)\partial_y\partial _y \phi(x) $$ since both the $\phi(x)$ and $\partial_y \phi(x)$ did not have to vanish at the spatial boundary, $$\int dx^3 \phi(x)\partial_y\phi(x)|_{y=-\infty}^{y=\infty}$$ didn't have to be zero. But one still saw the texts exchange those two different expressions, without specify which one was more "fundamental" or considered to be the definition.
Did $\int dx^4 \partial ^\mu \phi(x) \partial_\mu \phi(x)= -\int dx^4 \phi(x) \partial^2 \phi(x)$ in the path integral formalism?