Check that the wall reference lines are actually touching each other.
If they are then check the 'Legacy' settings in the Options menu.
If the Legacy is already off, then it is probably an issue with Building Material strengths or more likely the walls are in different layers and each layer has a different intersection priority number (or it is set to zero if they are in the same layer) - this will prevent them from trimming.
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