While looking into this question https://tex.stackexchange.com/questions/565031/slightly-bigger-integral-in-exponent I found that the formatting of \int differs slightly when using the amsmath package vs the base LaTeX with the former using a scriptstyle integral while the base uses a textstyle integral.

Given the following equation:

$e^{i \int \!dt\,\frac{1}{2}m\dot x^2}$

I get