### Godot version

4.0 Beta10

### System information

Windows 10, Vulkan, GTX1060

### Issue description

`PropertyTweener`'s methods' return value are not discarded and effect the unary operator at next line.

In Editor:
![in_editor](https://user-images.githubusercontent.com/61624558/210715100-04bdf283-7954-4be3-94ca-338987b24c5b.png)


In cpp:
![in_cpp](https://user-images.githubusercontent.com/61624558/210715127-519f6d54-fc15-468f-9aca-ba7d387a5a7b.png)


### Steps to reproduce

Just run the Minimal reproduction project.

### Minimal reproduction project

[Bug Report.zip](https://github.com/godotengine/godot/files/10349829/Bug.Report.zip)

} break;
		case GDScriptParser::DataType::SCRIPT: {
			result.kind = GDScriptDataType::SCRIPT;
			result.builtin_type = p_datatype.builtin_type;
			result.script_type_ref = p_datatype.script_type;
			result.script_type = result.script_type_ref.ptr();
			result.native_type = p_datatype.native_type;
		} break;
		case GDScriptParser::DataType::CLASS: {
			result.kind = GDScriptDataType::GDSCRIPT;
			result.builtin_type = p_datatype.builtin_type;
			result.native_type = p_datatype.native_type;
			bool is_local_class = parser->has_class(p_datatype.class_type);
			Ref<GDScript> script;
			if (is_local_class) {
				script = Ref<GDScript>(main_script);
			} else {
				Error err = OK;
				script = GDScriptCache::get_shallow_script(p_datatype.script_path, err, p_owner->path);
				if (err) {
					_set_error(vformat(R"(Could not find script "%s": %s)", p_datatype.script_path, error_names[err]), nullptr);
				}
			}
			if (script.is_valid()) {
				script = Ref<GDScript>(script->find_class(p_datatype.class_type->fqcn));
			}
			if (script.is_null()) {
				_set_error(vformat(R"(Could not find class "%s" in "%s".)", p_datatype.class_type->fqcn, p_datatype.script_path), nullptr);
				return GDScriptDataType();
			} else {