If this project is in AC17, then I think you have an Intersection Priority issue between the Wall and the Fill (Building Material) used in the Complex Profile. Try changing the Custom Profile's Fill (Building Material) to a Building Material that has an Intersection Priority that is equal or greater than the Wall's Building Material.
Another option is to use different Layer Intersection Group Numbers if the wall and trim are on different layers.
David
David Maudlin / Architect www.davidmaudlin.com Digital Architecture AC29 USA Perpetual • Mac mini M4 Pro OSX15 | 64 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14