One way collision works only when it enabled in inspector

Godot Version

4.2.1 stable


How to turn on one way collision via code without activation of self collision of rope segments

My rope-platform works fine when one way collision enabled from start, but when I set It through code:

get_node(SegmentPath + "/CollisionShape2D").set_one_way_collision(true)

It stops working properly and activates self collision between segments

collision layers and masks are 1/1 - for segments (yeah I know that it should trigger self collision from start BUT IT DOES NOT when one way collision is enabled)
3/1 - player