I'm trying to calculate distance between 2 points that were previously extracted by expression. The modell right now looks like this (the other processes are deactivated):

The models input is point vector layer (it will be csv points with geometries, later converted into .shp). To calculate the distance between the points I'm using the field calculator with expression:
distance(
geometry(get_feature_by_id( '@Extract_by_expression_Nageln_OUTPUT', '1')),
geometry(get_feature_by_id( '@Extract_by_expression_Nageln_OUTPUT', '2'))
)
Yet I keep getting back the null values, although the same method (with pointing out the layer names instead of algorithm's outputs) used in field calculator outside of modeler gives back right output.
Expression used in fieldcalc outside modeler:
distance(
geometry(get_feature_by_id( '2021_143_0003___Messdatei_155ee37b_b40d_40d4_beb6_fe01679f19f4', '1')),
geometry(get_feature_by_id( '2021_143_0003___Messdatei_155ee37b_b40d_40d4_beb6_fe01679f19f4', '2'))
)
I guess there's something wrong with the expression I'm using in the model, how can I solve this?
EDIT:
I also tried to modify the model to load extracted points as a layer with set name (pr-nageln) by which name I refer to the layer with get_feature_by_ID (as shown below:)
The results are the same in first iteration, when I use model again (with 'pr-nageln' temp-layer already loaded to project from first run) it manages to save the correct distance value as a string.
I already used this workaround in some other field calculations I need to refer other layername with fixed name, but this is the first time I try to use it combined with get_feature_by_id. Does anyone have any clue why it doesn't work right now? Or what could be easier way of calculating distance between two points extracted from pointlayer inside of model?
