How to scale integral symbol while properly placing limits of integration

i know of

and its solutions for scaling the integral to content using either the stretch function or lr() combind with mid(). However, only the former solution automatically allows limits of integrations to be placed appropriately. If one tries to place limits of integrations while using the mid() method, like with

$ lr(mid(integral)_A frac(dd^(D - 1, 1) ell, (2 pi)^D)) $

it undoes the scaling behavior. However, the inability to use mid() means one can’t rely on automatic scaling, and will have to manually configure integral sizes for any nonstandard sizes.

Thus, is there a workaround to get the mid() method to work while also properly placing limits of integration?