lec1212,
Material textures work best on flat planes, they may not align when used with sloped walls or especially curved walls.
BUT, you can force the material texture to align in 3D by using the Design>Align 3D texture>Set Origin command. To use it: you must be in the 3D window, select your wall first, then use the "set origin".
Because you are using a complex profile, I'm not sure this will work. You might need to add a node on the point joining the upper straight wall and slanted wall. This node will create two material surfaces, each one can have its origin set independently.
When I created this with a roof trim operation, both textures and wall joins looked good. I've included an image showing 1: how it looked when I created it, and 2 using set origin to move the texture off a little just to show the effect.
Snap