The best way to make the font of standalone graphics with pgfplots similar to the beamertheme in use for example moloch or metropolis. The principles of English grammar are the very rationale why such "strange things" come about in the primary place. Now, if you actually turn out utilizing a double "that" or rewording it, is often a different quest