Is there a way to disable this code generation?
No. If you want more freedom, you have to connect a signal from code.
Every time I use the editor to attach a signal it attempts to insert a "helpful" function stub for the signal. Including when one already exists.
The second sentence is not true: if there already is a function with exactly the same name, Godot will connect to it and won't create a new method-stub.
Correction: This is not true when working with GDscript. But apparently is the case for C# (and potentially other scripting languages as well, see my comment below).