Moving part of wall but connect it

Hey Guys,
im trying to move the yellow part of my wall in upward direction, like drawed in the image:

Note: the right part of my wall is pinned it should stay there. I used the cut function from Revit to get 2 independet parts of this wall.
While doing so the connection gets lost or cant be fitted. Revit tells me its not possible. It looks like this:
Do you have any ideas if its possible to do what im trying to with dynamo? My Script looks like this:

Note: im using a Model Line as reference point (“Referenz Küche Wand Y”).