There's not too much space, as far as TeX is concerned.
\documentclass[10pt,a4paper]{article}
\newcommand{\noic}[1]{\kern-\fontcharic\scriptscriptfont\fam`#1 }
\newcommand{\vr}{\kern-0.05pt\vrule width 0.1pt\kern-0.05pt}
\pagestyle{empty}
\begin{document}
$\widetilde{G\mkern 0mu}^{\scriptscriptstyle def}${\vr} x x
$\widetilde{G\mkern 0mu}^{\scriptscriptstyle def\noic{f}}${\vr} x x
\showoutput
\end{document}

The hairline is meant to show where TeX thinks the formula ends. If you look at the space between the hairline and “x”, you'll realize it's the same as the space between the two following letters.
What's the difference between top and bottom? At the end of the superscript, TeX, by rule, adds the italic correction pertaining to the last math letter. As you can see in the log file, from
....\hbox(3.47221+0.97221)x11.59406, shifted -7.2778
.....\OML/cmm/m/it/5 d
.....\OML/cmm/m/it/5 e
.....\OML/cmm/m/it/5 f
.....\kern0.59029
....\mathoff
the italic correction is about 0.6pt (that is, 0.21mm). In the bottom row the italic correction is removed
....\hbox(3.47221+0.97221)x11.00377, shifted -7.2778
.....\OML/cmm/m/it/5 d
.....\OML/cmm/m/it/5 e
.....\OML/cmm/m/it/5 f
.....\kern0.59029
.....\kern -0.59029
....\mathoff
by explicitly inserting a negative kern. The difference is very tiny even at the big magnification in the picture.
The visual problem is due to the shape of the math italic “f”. If you deem the produced hole is too big (I don't think so), then add yourself a negative kern after the formula.
With a proper setting of the “def” text, upright, you get

and the problem is much less evident. The italic correction is about 0.44pt (that is, 0.14mm).
\!
before the closing$
do what you want?\mkern0mu
directive?\documentclass[10pt,a4paper]{article} \begin{document} The space after $\widetilde{G\mkern 0mu}^{\scriptscriptstyle def}\!$ is too large. \end{document}
, the spacing is definitely changed. You can even use several\!
in a row like\!\!
if that isn't enough for you.