In my experience, yes.
For example, you can't do something like this:
var pt = Point({ 'x': 100, 'y': 100, 'spatialReference':{'wkid':102100} });
Console(pt)
// attempt to change x coordinate
// this will fail
pt.x += 5
Console(pt)
"Immutable" just means "This object and its values can not be changed".
To work around it, you have to make a copy of the geometry's values, change them and then create a new geometry with these changed values:
var pt = Point({ 'x': 100, 'y': 100, 'spatialReference':{'wkid':102100} });
Console(pt)
// attempt to change x coordinate
//pt.x += 5
var new_pt = Point({'x': pt.x + 5, 'y': pt.y, 'spatialReference': pt.spatialReference})
Console(new_pt)
// you could also extract the geometry's dictionary and change the values there:
var pt_dict = Dictionary(Text(pt))
pt_dict.y += 5
var new_pt_2 = Point(pt_dict)
Console(new_pt_2)
To change the geometry of polylines or polygons, you have to take it a step further: you have to recreate the paths/rings.
var old_path = Geometry($feature).paths[0]
var sr = Geometry($feature).spatialReference
var new_path = []
for(var i in old_path) {
// move vertext to north east and remove digits, because why not?
var new_vert = Point({'x': Round(old_path[i].x) + 100, 'y': Round(old_path[i].y) + 100, 'spatialReference': sr})
Push(new_path, new_vert)
}
var new_geo = Polyline({'paths': [new_path], 'spatialReference': sr})
Console(Geometry($feature))
Console(new_geo)
Have a great day!
Johannes