### Godot version

4.1.3

### System information

Windows 10

### Issue description

E 0:00:47:0705   Message.gd:46 @ from_raw(): Class 'FileAccess' or its base class cannot be instantiated.
  <Erreur C++>   Condition "!ti->creation_func" is true. Returning: nullptr
  <Source C++>   core/object/class_db.cpp:341 @ instantiate()
  <Pile des appels>Message.gd:46 @ from_raw()
                 WebRTCClient.gd:30 @ _process()

`from_raw() is a byte_to_var_with_objects() function`

### Steps to reproduce

try to decode an array containing a FileAccess object among many other vars

byte_to_var_with_objects([FileAccess.open(path, FileAccess.READ), a, b, c, d, ...])

### Minimal reproduction project

N/A
CharString utf8 = p_string.utf8();
	if (buf) {
		encode_uint32(utf8.length(), buf);
		buf += 4;
		memcpy(buf, utf8.get_data(), utf8.length());
		buf += utf8.length();
	}
	r_len += 4 + utf8.length();
	while (r_len % 4) {
		r_len++; 
		if (buf) {
			*(buf++) = 0;
		}
	}
}
Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bool p_full_objects, int p_depth) {
	ERR_FAIL_COND_V_MSG(p_depth > Variant::MAX_RECURSION_DEPTH, ERR_OUT_OF_MEMORY, "Potential infinite recursion detected. Bailing.");
	uint8_t *buf = r_buffer;
	r_len = 0;
	uint32_t flags = 0;
	switch (p_variant.get_type()) {
		case Variant::INT: {
			int64_t val = p_variant;
			if (val > (int64_t)INT_MAX || val < (int64_t)INT_MIN) {
				flags |= ENCODE_FLAG_64;
			}
		} break;