$$\lim_{x \to \frac{\pi}{4}} (\tan x)^{\tan(2x)} = \lim_{x \to \pi/4} e^{\tan 2x \ln(\tan x)}$$
Now,
$\lim_{x \to\frac{\pi}{4}} \tan (2x)\ln(\tan x) \\= \lim_{x \to\frac{\pi}{4}} \frac{\sin 2x \ln(\tan x)}{\cos 2x} \left(\frac {0}{0} \text{ form }\right)\\= \lim_{x \to\frac{\pi}{4}} \frac { \frac{ \sin 2x \sec^2 x}{\tan x} + 2 \cos 2x . \ln \tan x }{-2 \sin 2x} (\text{L'Hospital's rule})\\= \frac{2}{-2}= -1$
So,
$$\lim_{u \to -1} e^u = \frac{1}{e}, \\\text{where } u = \tan (2x) \ln(\tan x)$$