Trying to create multipart polyline from array of arrays (arcpy.Polyline containing multiple arcpy.Array (each is a singlepart line)) or list of coords. Tried it in multiple ways.

Inserting a list of 3D coords into Z-enabled feature class as shown in https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/writing-geometries.htm class only worked for singlepart features for me.
Creating multipart polyline without Z values also works as also shown in Write Geometries:

This also didn´t work after I added z-coord into the points.
Created multipart polyline without z-coord, inserted it into Z-enabled feature class. Tried to update z-coords using script similar to https://community.esri.com/t5/python-questions/change-z-coordinates-of-vertexes-by-updatecursor/m-p/598505#M46835 but applied to ArcGIS Pro 2.9, the script can run without errors. After I change z-coord of a point, .Z property prints correct z-coord. But after I create a new multipart polyline from points with correct Z-coord and update the row with it, Z-coords of all updated polyline points are equal to 0.
Does anyone know how to solve this?