I know this post is old, but I was recently wondering the same thing and coudn't find answers. However, I think I randomly stumbled on a way to do this through GDScript, and wanted to share for others with the same problem :P.
DISCLAIMER, I only have 2 weeks of experience using godot and am not a programmer.
I followed the instructions for adding a custom node type in the "Making Plugins" tutorial, but I also added the line
class_name CustomNodeName in my custom node .gd file, right after the
extends ... line.
now, when I add in my custom node, it comes with an attached script, but the script icon is greyed out like in this image (in my case, my custom node is called Node25D)
to attach a script on top of this one so your custom node keeps it's custom propreties and has your new script, I discovered a magic button in the inspector called "Extend Script" in the next image! :P
Bam! this is how I attached a script to a custom node, and every thing seems to work fine!