I did not know there was a build-in function to find integrating factor, but here is a basic implementation from scratch.
In this, the form $m(x,y) dx + n(x,y) dy = 0$ is used, as I am more used to it. So in place of our $P$ it is now $m(x,y)$ and in place of your $Q$ it is now $n(x,y)$
You call it as
m = -2*Exp[2*x]*x^3 - 2*Exp[y];
n = Exp[y] x;
getIntegratingFactor[m, n, x, y]

m = Exp[y] - x; n = Exp[y]*(Exp[y] + x);
getIntegratingFactor[m, n , x, y]

m = 2*x*y; n = -2*x^2 + y^2;
getIntegratingFactor[m, n , x, y]

m = -(-x y - 1);
n = (4 x^3 y - 2 x^2);
getIntegratingFactor[m, n , x, y]

m = x^2 + y^2 + 2 x; n = 2 y;
getIntegratingFactor[m, n , x, y]

code
getPatterns[expr_, pat_] :=
Last@Reap[expr /. a : pat :> Sow[a], _, Sequence @@ #2 &];
getIntegratingFactor[m_, n_, x_, y_] := Module[{a, b, r, s, mu, t},
(*find integrating factor for m*dx+n*dy=0*)
(*version 1.0 alpha, July 9, 2020 10 AM*)
If[Simplify[D[m, y] - D[n, x] == 0],
Return["It is allready exact, no integrating factor needed",Module]];
a = Simplify[(D[m, y] - D[n, x])/n];
If[Length[getPatterns[a, y]] == 0,
Return[Row[{"Integrating factor is mu=",Exp[Integrate[a, x]]}], Module]];
b = Simplify[(D[n, x] - D[m, y])/m];
If[Length[getPatterns[b, x]] == 0,
Return[Row[{"Integrating factor is mu=", Exp[Integrate[b, y]]}],Module]];
r = (D[n, x] - D[m, y])/(x*m - y*n);
r = Simplify[r];
r = r /. (x^s_.*y^s_.) -> t^s;
If[Length[getPatterns[r, x]] == 0 && Length[getPatterns[r, y]] == 0,
mu = Simplify[Exp[Integrate[r, t]]];
mu = mu /. t -> (x*y);
Return[Row[{"Integrating factor is mu=", mu}], Module]
,
Print["Unable to find integrating factor"];
]
];
The helper function getPatterns
used above is thanks to Carl Woll.
To help clarify the code above, here is Fortran-like flow chart of the algorithm. Drawing done using ipe Latex drawing diagram.

Bug reports are always welcome.