Nothing to do with junction order in this case.
It is the strengths of the building materials you have used for the walls.
The white wall is stronger than the top wall.
They will automatically trim to each other as soon as the reference lines touch (Archicad automatically does this).
The white wall is stronger so it will trim away the top wall.
There are a few ways to fix this.
The easiest is to use a building material (structure) for the two corner walls that is stronger than the white wall, or use one for the white wall that is weaker than the other walls.
This may require duplicating one of the building materials and making a weaker/stronger version of it.
So you can keep the original building material as well as you may need to use it in other locations with the strength it currently has.
If that is not an option then you can swap the reference line of the top wall so it is on the other side of the wall.
Then you can trim (split) the white wall to the inside of the top wall and delete the intersecting part.
This will manually override the automatic connection, but if you edit the white wall it may automatically re-trim and you will have to split it again.
There is another option using layers with different intersection priority numbers.
Walls in layers that have different numbers will not trim with each other.
Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11