This is how you punish someone forcing scholars mate on you
Qf3 is not a totally useless move, but black basically equalised after it(Qf3 is more useful than a3, which usually hands black equality or more)
This is a very extreme example as your opponent combined inaccurate play(Qf3 with mistakes (g4)
That is why i am using the word force otherwise its a normal scholars mate attempt which can be defended Nf6
This is a guide to all the new chess players on how to dominate someone who is forcing scholars mate on you . I personally had a lot of problem with this as a beginner .Hope this helps you.Good luck!!!