### Godot version

v4.0.beta13.official [caacade56]

### System information

Linux Ubuntu 20.04 with Unity desktop

### Issue description

When calling an undefined function in the shader editor with argument(s), such as `undefined_function(1)`, the error reads:

> Too many arguments for "undefined_function()" call. Expected at most 0 but received 1.

instead of the expected:

> No matching function found for: 'undefined_function'.

This is possibly a regression introduced in https://github.com/godotengine/godot/issues/18225, since the latter was focused on the arguments part.

To avoid such regression in the future, consider adding a unit test with this case (and, in fact, unit tests for the other signature errors too if there are not already).

### Steps to reproduce

1. Create a shader resource and open the shader editor
2. Enter `undefined_function(1);` in the fragment() definition

### Minimal reproduction project

N/A
if (info.constant) {
													error = true;
												}
											}
										}
										if (error) {
											_set_error(vformat(RTR("A constant value cannot be passed for '%s' parameter."), _get_qualifier_str(arg_qual)));
											return nullptr;
										}
									}
									if (is_sampler_type(call_function->arguments[i].type)) {
										
										ERR_CONTINUE(n->type != Node::NODE_TYPE_VARIABLE); 
										VariableNode *vn = static_cast<VariableNode *>(n);
										StringName varname = vn->name;
										if (shader->uniforms.has(varname)) {
											
											ShaderNode::Uniform *u = &shader->uniforms[varname];
											ERR_CONTINUE(u->type != call_function->arguments[i].type); 
											if (RendererCompositor::get_singleton()->is_xr_enabled() && is_custom_func) {
												ShaderNode::Uniform::Hint hint = u->hint;
												if (hint == ShaderNode::Uniform::HINT_DEPTH_TEXTURE || hint == ShaderNode::Uniform::HINT_SCREEN_TEXTURE || hint == ShaderNode::Uniform::HINT_NORMAL_ROUGHNESS_TEXTURE) {
													_set_error(vformat(RTR("Unable to pass a multiview texture sampler as a parameter to custom function. Consider to sample it in the main function and then pass the vector result to it."), get_uniform_hint_name(hint)));
													return nullptr;
												}
											}
											
											if (!_propagate_function_call_sampler_uniform_settings(name, i, u->filter, u->repeat)) {
												return nullptr;
											}