[quote user="Maxim Kulikov"]I had another variant: to create a new ComplexShape[/quote]
Good approach: it simplifies the Edit|Undo command.
[quote user="Maxim Kulikov"]CreateComplexShapeElement1is not working, but CreateComplexStringElement1is working.[/quote]
You may find that is a data quality issue. I believe that CONNECT is less tolerant (than previous versions of MicroStation) of lines that don't meet accurately when creating a shape.
We have not seen your DGN data (only a screenshot), so can't comment. Examine carefully the start and end points of adjacent line-strings to see if you have a genuine closure.