### Godot version

4.0beta14

### System information

Windows 10

### Issue description

Returned Array value isn't converted to Packed*Array

### Steps to reproduce

```
var string_array: PackedStringArray = ["test"] # valid
var int_array: PackedInt32Array = [3] # valid

func get_packed_string_array() -> PackedStringArray:
	return ["test"] #error


func get_packed_int_array() -> PackedInt32Array:
	return [3] #error
```

Line 8:Cannot return value of type "Array" because the function return type is "PackedStringArray".
Line 12:Cannot return value of type "Array" because the function return type is "PackedInt32Array".

### Minimal reproduction project

[return_bug.zip](https://github.com/godotengine/godot/files/10490367/return_bug.zip)

if (p_statement == nullptr) {
		return;
	}
	switch (p_statement->type) {
		case GDScriptParser::Node::IF:
		case GDScriptParser::Node::FOR:
		case GDScriptParser::Node::MATCH:
		case GDScriptParser::Node::PATTERN:
		case GDScriptParser::Node::RETURN:
		case GDScriptParser::Node::WHILE:
			
			if (p_suite->get_datatype().is_set() && (p_suite->get_datatype() != p_statement->get_datatype())) {
				
				
				p_suite->datatype.kind = GDScriptParser::DataType::VARIANT;
				p_suite->datatype.type_source = GDScriptParser::DataType::UNDETECTED;
			} else {
				p_suite->set_datatype(p_statement->get_datatype());
				p_suite->datatype.type_source = GDScriptParser::DataType::INFERRED;
			}
			break;
		default:
			break;
	}
}
void GDScriptAnalyzer::resolve_suite(GDScriptParser::SuiteNode *p_suite) {