Repository: godot
Issue: VisualScript crashes when reconnecting _physics and  _process_physics nodes delta to Construct Vector3
Labels: bug,topic:visualscript,crash

### Godot version

Godot_v3.4.4-stable_x11.64

### System information

Linux, Ubuntu 20.04 LTS, NVIDIA GTX 1650 Super, GLES3

### Issue description

I have tried VisualScript for first time to check if it is any useful, and I found several ways to crash it during my fooling around. This is one of the bugs I found. When I create a visual script for 3D box and override both _physics and _process_physics methods, then  connect delta from _processPhysics to Construct Vector3's x (or other coordinate) and then try to connect _physics delta to the same box, it crashes the editor.

```
ERROR: A function node has already been set here.
   at: add_node (modules/visual_script/visual_script.cpp:307)
ERROR: Condition "!func.nodes.has(p_id)" is true. Returned: Ref<VisualScriptNode>()
   at: get_node (modules/visual_script/visual_script.cpp:381)

handle_crash: Program crashed with signal 11
Engine version: Godot Engine v3.4.4.stable.official (419e713a29f20bd3351a54d1e6c4c5af7ef4b253)
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x430c0) [0x7fb4492140c0] (??:0)
[2] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0xbe31e7] (??:0)
[3] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0xc00238] (??:0)
[4] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0xa03931] (??:0)
[5] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x2b77c39] (??:0)
[6] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x2ba7988] (??:0)
[7] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x2babd9f] (??:0)
[8] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x2bac010] (??:0)
[9] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0xc3ebbb] (??:0)
[10] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0xc12fbb] (??:0)
[11] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x2b77c39] (??:0)
[12] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x2b7802d] (??:0)
[13] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x2b78d0c] (??:0)
[14] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x1e56680] (??:0)
[15] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0xc62695] (??:0)
[16] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x2b77c39] (??:0)
[17] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x2b7802d] (??:0)
[18] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x1dabbf3] (??:0)
[19] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x1dbe081] (??:0)
[20] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x1dc0225] (??:0)
[21] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x1dc038b] (??:0)
[22] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0xc62695] (??:0)
[23] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x2b77c39] (??:0)
[24] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x2b6ab94] (??:0)
[25] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x1d967ed] (??:0)
[26] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x1da81d9] (??:0)
[27] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x98029b] (??:0)
[28] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x9814a9] (??:0)
[29] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x98a922] (??:0)
[30] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x94719c] (??:0)
[31] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7fb4491f50b3] (??:0)
[32] /home/tester/godot/Godot_v3.4.4-stable_x11.64() [0x95ae1e] (??:0)
-- END OF BACKTRACE --
```

### Steps to reproduce

1. Create new project (OpenGL ES 3.0)
2. Click 3D Scene to create Spatial node
3. Add CSGBox as a child to Spatial node
4. Attach new VisualScript CSGBox.vs to the box
5. In visual editor click on Functions: override an existing built-in function
6. Choose Physics Process(float)
7. Click again on on Functions: override an existing built-in function
8. Choose Process(float)
9. Right click on the plane and search for: Construct Vector 3XYZ  and add it
10. Move with nodes around a bit (probably not important, but I did it during reproduction)
11. Connect _physics_process delta with x of Construct Vector3
12. Connect _process delta with x of Construct Vector3 (it should replace existing connection, might connect to y,z too...)
13. Crash!

### Minimal reproduction project

_No response_