When I add "linear_trendline.name = "123"
This raises the error;
"Error saving workbook: 'str' object has no attribute 'to_tree'
Code sample
line_props = LineProperties(prstDash='sysDot', w=19000, solidFill='2E74B5')
g_props = GraphicalProperties(ln=line_props)
linear_trendline = Trendline(spPr=g_props)
linear_trendline.name = "123" # <--- This line
chart.series[0].trendline = linear_trendline
excel_path = os.path.join(self.cwd, 'test3.xlsx')
wb.save(excel_path)
wb.close()
When the Excel workbook is saved, Openpyxl will process the data to be included into the Excel Sheet, section by section including the Charting and any additional Charting details.
When the code is processing the 'trendline' data and gets to the 'child_tag' with the name of 'name' it reads it's value which is assigned to the variable 'obj'. This variable might usually be an object but will sometimes have another type. In this case it is a String, specifically with the value of "123" in your case.
The code continues to this line where it probably should test True for the 'name' property;
However the child_tag 'name' is not in the tuple 'nested' and therefore fails this check. The other expected params for Trendline do exist in the tuple, like;

'backward','dispEq','dispRSqr','forward','intercept','order','period','trendlineType'
but not 'name'.
Given the parameter fails this check the code continues on and ultimately tries to treat the variable obj as an object and calls the attribute
to_tree(), this is where the error is encountered since being a String it does not have that attribute.I checked the Openpyxl Trendline code and indeed the parameter 'name' exists but is not enabled to be included in the 'nest' so will fail to be recognised as a different type to be alternatively processed.
As a test, I did enable 'name' on my installation and made a test run of a ScatterChart setting the trendline name as '123' per your requirement and this worked.
The code ran without errors ('to_tree' or other) and the Chart trendline name was changed as set, to '123'.
See the test chart below;
This may be a bug or by design in Openpyxl either way requires modifying an Openpyxl file to obtain the result you desire.
Given this requirement I would suggest raising the issue with Openpyxl Development group for their response and an official fix.