When the reference line of 3 walls connect, there is often a problem that you (Archicad) may not be able to solve.
Try adjusting the junction order as Ling has suggested.
I am not sure it will work perfectly in this case.
You could also move the reference line (of the red walls) to the other side of the walls (outside?), but I think you will still have issues with the attached (purple) walls, as technically they won't connect as their reference lines do not touch the other reference lines.
Changing the junction order basically mimics this behaviour anyway.
You may need patch with fills (won't help in 3D) or place a complex profile column at the corners to achieve the correct trimming.
If you want you can select these walls in plan.
Go to the FILE menu > External Content > Save selection as a Module. (un-tick the replace selection with module' option).
Then ZIP the MOD file and attach it here.
Maybe we can then look at it in more detail - saves us having to create the composite walls.
Barry.
One of the forum moderators.
Versions 6.5 to 22
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10