I have couples of immediate calculation rules that worked fine in ArcGIS Pro 2.9. After upgrading to 3.0.5 they don't work anymore. I even tried with ArcGIS Pro 3.1.1 with the same result. I reduced my rules to find the line that produced the error. Finally it seems to be a problem with m-aware feature classes.
For my tests I used Arc GIS Pro 3.0.5 with branch versioned data published to our Enterprise Portal (version 11.0.0). The feature classes are stored in a enterprise geodatabase (SQL).
I published two line feature classes. One with m-values and one without and added the same simple rule to them:
var feature_ = $feature;
var g = Geometry(feature_);
var t = Text(g)
var p = Polyline(t)
return p
This rule works fine for the feature class without m-values. If I try to modify a geometry with the m-aware polyline I get this error:

So it seems to bee a problem with the m-values in ArcGIS Pro 3.0.5 and newer.
Is there any workaround for this problem?