You can make a resource unique from script by creating a new instance of it with duplicate() and setting it up in place of the original.
Example with a material on a sprite:
I had a similar problem but with cloning/duplicating Area2Ds but the CollisionShape2D’s actual shape (RectangleShape2D) was still shared even after duplicating. node.duplicate(true) also didn’t change this.
The following now worked:
(Maybe it helps somebody else too)
var new_area_2d := $TemplateArea2D.duplicate()
new_area_2d.get_children()[0].shape = new_area_2d.get_children()[0].shape.duplicate()