### 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)

if (p_is_nested) {
				
				GDScriptCodeGenerator::Address constant = codegen.add_constant(true);
				codegen.generator->write_and_right_operand(constant);
				codegen.generator->write_end_and(p_previous_test);
			} else if (!p_is_first) {
				
				GDScriptCodeGenerator::Address constant = codegen.add_constant(true);
				codegen.generator->write_or_right_operand(constant);
				codegen.generator->write_end_or(p_previous_test);
			} else {
				
				codegen.generator->write_assign_true(p_previous_test);
			}
			return p_previous_test;
	}
	ERR_FAIL_V_MSG(p_previous_test, "Reaching the end of pattern compilation without matching a pattern.");
}
void GDScriptCompiler::_add_locals_in_block(CodeGen &codegen, const GDScriptParser::SuiteNode *p_block) {
	for (int i = 0; i < p_block->locals.size(); i++) {
		if (p_block->locals[i].type == GDScriptParser::SuiteNode::Local::PARAMETER || p_block->locals[i].type == GDScriptParser::SuiteNode::Local::FOR_VARIABLE) {
			
			continue;
		}
		codegen.add_local(p_block->locals[i].name, _gdtype_from_datatype(p_block->locals[i].get_datatype(), codegen.script));
	}
}
Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::SuiteNode *p_block, bool p_add_locals) {