### Godot version

4.0.stable

### System information

Ubuntu, AMD Ryzen 5 2600, GTX 1650, Vulkan

### Issue description

When putting Tilemaps with lots of tiles on Parallaxlayers, it massively slows down Godot from roughly around 600fps to 20fps. This happens whether or not the parallaxlayers are invisible, have lightoccluder information, or have collision. It seems just the process of having lots of tiles exist slows it down. 

### Steps to reproduce

Open the minimal project and convert the 2 parallaxlayers from parallaxlayers to basic node2ds and watch the FPS massively increase.

### Minimal reproduction project

[ParallaxTilemap.zip](https://github.com/godotengine/godot/files/11566812/ParallaxTilemap.zip)

TileSet::TerrainsPattern _get_best_terrain_pattern_for_constraints(int p_terrain_set, const Vector2i &p_position, const RBSet<TerrainConstraint> &p_constraints, TileSet::TerrainsPattern p_current_pattern);
	RBSet<TerrainConstraint> _get_terrain_constraints_from_added_pattern(const Vector2i &p_position, int p_terrain_set, TileSet::TerrainsPattern p_terrains_pattern) const;
	RBSet<TerrainConstraint> _get_terrain_constraints_from_painted_cells_list(int p_layer, const RBSet<Vector2i> &p_painted, int p_terrain_set, bool p_ignore_empty_terrains) const;
	
	void _set_tile_data(int p_layer, const Vector<int> &p_data);
	Vector<int> _get_tile_data(int p_layer) const;
	void _build_runtime_update_tile_data(SelfList<TileMapQuadrant>::List &r_dirty_quadrant_list);
	void _tile_set_changed();
	bool _tile_set_changed_deferred_update_needed = false;
	void _tile_set_changed_deferred_update();
protected:
	bool _set(const StringName &p_name, const Variant &p_value);
	bool _get(const StringName &p_name, Variant &r_ret) const;
	void _get_property_list(List<PropertyInfo> *p_list) const;
	void _notification(int p_what);
	static void _bind_methods();
public:
	static Vector2i transform_coords_layout(const Vector2i &p_coords, TileSet::TileOffsetAxis p_offset_axis, TileSet::TileLayout p_from_layout, TileSet::TileLayout p_to_layout);
	enum {
		INVALID_CELL = -1
	};
#ifdef TOOLS_ENABLED
	virtual Rect2 _edit_get_rect() const override;
#endif
	void set_tileset(const Ref<TileSet> &p_tileset);
	Ref<TileSet> get_tileset() const;
	void set_quadrant_size(int p_size);
	int get_quadrant_size() const;
	static void draw_tile(RID p_canvas_item, const Vector2 &p_position, const Ref<TileSet> p_tile_set, int p_atlas_source_id, const Vector2i &p_atlas_coords, int p_alternative_tile, int p_frame = -1, Color p_modulation = Color(1.0, 1.0, 1.0, 1.0), const TileData *p_tile_data_override = nullptr, real_t p_animation_offset = 0.0);