Tilemaps vanish when other tilemap uses duplicate function

Godot Version

Godot 4


I have several tilemaps using the same tileset. I wanted to make the tilesets unique to the nodes at runtime, but when i use this code

self.tile_set = self.tile_set.duplicate()

on one of the tilemaps, all the others vanish at runtime. Am i doing something wrong, or is this a bug, thanks!