### 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)
using namespace Clipper2Lib;
	Vector<Vector2> polygon_vertices;
	for (const Point64 &polypath_point : p_polypath_item->Polygon()) {
		polygon_vertices.push_back(Vector2(static_cast<real_t>(polypath_point.x), static_cast<real_t>(polypath_point.y)));
	}
	TPPLPoly tp;
	tp.Init(polygon_vertices.size());
	for (int j = 0; j < polygon_vertices.size(); j++) {
		tp[j] = polygon_vertices[j];
	}
	if (p_polypath_item->IsHole()) {
		tp.SetOrientation(TPPL_ORIENTATION_CW);
		tp.SetHole(true);
	} else {
		tp.SetOrientation(TPPL_ORIENTATION_CCW);
	}
	p_tppl_in_polygon.push_back(tp);
	for (size_t i = 0; i < p_polypath_item->Count(); i++) {
		const PolyPath64 *polypath_item = p_polypath_item->Child(i);
		generator_recursive_process_polytree_items(p_tppl_in_polygon, polypath_item);
	}
}
bool NavMeshGenerator2D::generator_emit_callback(const Callable &p_callback) {
	ERR_FAIL_COND_V(!p_callback.is_valid(), false);
	Callable::CallError ce;
	Variant result;
	p_callback.callp(nullptr, 0, result, ce);
	return ce.error == Callable::CallError::CALL_OK;
}
void NavMeshGenerator2D::generator_bake_from_source_geometry_data(Ref<NavigationPolygon> p_navigation_mesh, Ref<NavigationMeshSourceGeometryData2D> p_source_geometry_data) {