### Godot version

4.2 beta 2

### System information

Pop Os 22.04 lts 12th Gen Intel® Core™ i7-12700H × 20 NVIDIA RTX A2000 8GB 32.0  ram. Tested on Forward+ and Mobile

### Issue description

When painting a tile that is rotated or flipped, it looses its physics layer as demonstrated in this video:  

https://github.com/godotengine/godot/assets/33091666/c10f7325-838f-4112-b90d-0c3d9797d08f

Even though in the video I showed this only happening with one of the tiles, it happens with both of them as long as you rotate or flip it. 

### Steps to reproduce

1. Create a tilemap and a tileset
2. Create a physics layer and set collision_visibility_mode to force show. 
3. Assign just created physics layer to tiles
4. Paint the tiles and use rotate or flip tool. 

### Minimal reproduction project

[TileTest.zip](https://github.com/godotengine/godot/files/13067412/TileTest.zip)
obstruction_outline.resize(collision_polygon_points.size());
				const Vector2 *collision_polygon_points_ptr = collision_polygon_points.ptr();
				Vector2 *obstruction_outline_ptrw = obstruction_outline.ptrw();
				for (int obstruction_outline_index = 0; obstruction_outline_index < obstruction_outline.size(); obstruction_outline_index++) {
					obstruction_outline_ptrw[obstruction_outline_index] = tile_transform_offset.xform(collision_polygon_points_ptr[obstruction_outline_index]);
				}
				p_source_geometry_data->_add_obstruction_outline(obstruction_outline);
			}
		}
	}
}
void NavMeshGenerator2D::generator_parse_source_geometry_data(Ref<NavigationPolygon> p_navigation_mesh, Ref<NavigationMeshSourceGeometryData2D> p_source_geometry_data, Node *p_root_node) {
	List<Node *> parse_nodes;
	if (p_navigation_mesh->get_source_geometry_mode() == NavigationPolygon::SOURCE_GEOMETRY_ROOT_NODE_CHILDREN) {
		parse_nodes.push_back(p_root_node);
	} else {
		p_root_node->get_tree()->get_nodes_in_group(p_navigation_mesh->get_source_geometry_group_name(), &parse_nodes);
	}
	Transform2D root_node_transform = Transform2D();
	if (Object::cast_to<Node2D>(p_root_node)) {
		root_node_transform = Object::cast_to<Node2D>(p_root_node)->get_global_transform().affine_inverse();
	}
	p_source_geometry_data->clear();
	p_source_geometry_data->root_node_transform = root_node_transform;
	bool recurse_children = p_navigation_mesh->get_source_geometry_mode() != NavigationPolygon::SOURCE_GEOMETRY_GROUPS_EXPLICIT;
	for (Node *E : parse_nodes) {
		generator_parse_geometry_node(p_navigation_mesh, p_source_geometry_data, E, recurse_children);
	}
};
static void generator_recursive_process_polytree_items(List<TPPLPoly> &p_tppl_in_polygon, const Clipper2Lib::PolyPath64 *p_polypath_item) {