PROBLEM
You have a wall with an opening in it created by either editing the wall Profile, or by placing a Wall Opening.
This wall has a layer that is unlocked and extended (e.g. external brickwork).
When you change the value of parameter Base Extension Distance of the wall the unlocked layer also moves at the head of the opening.
This problem may also occur if you extend the top of a wall layer.
CAUSE
When the profile is edited, the bottom-most horizontal line is still recognized as the base of the wall, so if you edit the Base Extension Distance, you end up with that same extension happening at the “opening head” (see first image in figure below).
If you use an Opening the problem only occurs if the opening starts at the base of the wall (base of actual wall, not the layer) - see last image in figure below.
If the opening starts above the base of the wall the problem won't occur - see middle image in figure below.
SOLUTION 1 - Rectangular Opening.
Start an in-place family, Component > Model In-place, select Wall category, give it a name. Then use Opening tool to create the opening. Revit will ask you to pick a host, pick the wall and draw sketch the opening. You can lock the sketch lines to levels etc.
SOLUTION 2 - edited Profile.
If the problem occurs with an edited wall profile, create the opening 2mm above the base of the wall, or set the base of the wall 2mm lower (using Base Offset parameter)..
SOLUTION 3 - Wall within Wall.
If the problem occurs with walls placed with openings, embed one wall within another using the Cut tool instead. It is easiest to do this in plan view.
The embedded wall can have its profile edited (so it is not rectangular) and will still cut the correct shaped opening in the host wall.