The capping is a separate profile from the wall. This is the first time I had this issue.
However I found a really simple way to fix it. That is I put all the capping into a separate layer and change the layer number to 2. It works and I don't have to set the priority of material.
If that worked then carefully check the height of the top of the wall and the height of the base of the capping.
If they are overlapping then you may get an odd trim like you have shown.
If they don't overlap then there should be no problem as they won't be trying to trim each other - the same as when in different layers with different intersection numbers.
One of the forum moderators.
Versions 6.5 to 25
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