### 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)
ClassDB::bind_method(D_METHOD("get_polygon_count"), &GenericTilePolygonEditor::get_polygon_count);
	ClassDB::bind_method(D_METHOD("add_polygon", "polygon", "index"), &GenericTilePolygonEditor::add_polygon, DEFVAL(-1));
	ClassDB::bind_method(D_METHOD("remove_polygon", "index"), &GenericTilePolygonEditor::remove_polygon);
	ClassDB::bind_method(D_METHOD("clear_polygons"), &GenericTilePolygonEditor::clear_polygons);
	ClassDB::bind_method(D_METHOD("set_polygon", "index", "polygon"), &GenericTilePolygonEditor::set_polygon);
	ClassDB::bind_method(D_METHOD("get_polygon", "index"), &GenericTilePolygonEditor::get_polygon);
	ADD_SIGNAL(MethodInfo("polygons_changed"));
}
GenericTilePolygonEditor::GenericTilePolygonEditor() {
	toolbar = memnew(HBoxContainer);
	add_child(toolbar);
	tools_button_group.instantiate();
	button_expand = memnew(Button);
	button_expand->set_theme_type_variation("FlatButton");
	button_expand->set_toggle_mode(true);
	button_expand->set_pressed(false);
	button_expand->set_tooltip_text(TTR("Expand editor"));
	button_expand->connect("toggled", callable_mp(this, &GenericTilePolygonEditor::_toggle_expand));
	toolbar->add_child(button_expand);
	toolbar->add_child(memnew(VSeparator));
	button_create = memnew(Button);
	button_create->set_theme_type_variation("FlatButton");