With a custom window (or door), you must model everything. You have the window frame - but did not model the jambs/sill to cover up the wall cavity...and any (as you decide) interior/exterior trim.
Typically, I would recommend using tiny walls for the frame vs cutting a hole in a slab... then you have parametric control over the frame thickness.
At this point, I would just model the jambs with tiny thin walls, sufficiently tall to match the wall cavity between the frame and exterior wall surface.
If this is really just a wide rectangle, as in your screenshot, I'm not sure why you're creating a custom (non parametric) window though? Maybe the screenshot is just to illustrate the problem for us?
Cheers,
Karl
PS I should add that the old tutorials on creating custom windows were written before AC had the ability to show the skins, including air gaps, of composites as in your screenshot, so didn't address what you're encountering.
One of the forum moderators
AC 28 USA and earlier • macOS Sequoia 15.2, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB