Source of the problem (scroll down for solution)
TL;DR: Changing the position of the y-axis label triggers an axis resize that doesn't account for rotated y-axis labels.
Here's a demo similar to yours that illustrates the problem.
1) Create an axes with a y-axis label in its default orientation. Draw a red rectangle around the OuterPosition of the axes and a green rectangle around the Position/InnerPosition of the axes.
figure('color', 'w', 'MenuBar', 'none');
ax1 = axes('OuterPosition',[.25 0.40 .7 0.50]);
ax1.ActivePositionProperty = 'outerposition';
ax1.Title.String = 'Preserve OuterPosition';
ax1.YLabel.String = 'Preserve OuterPosition';
ah(1) = annotation('rectangle',ax1.OuterPosition,'Color', 'r','LineWidth',2);
ah(2) = annotation('rectangle',ax1.Position,'Color','g','LineWidth',2);
2) Rotate the y-axis label and set alignment. Draw blue dashed rectangles showing the updated position properties.
ax1.YLabel.HorizontalAlignment = 'right';
ax1.YLabel.VerticalAlignment = 'top';
ah(3) = annotation('rectangle',ax1.OuterPosition, 'Color', 'b', 'LineStyle','--','LineWidth',2);
ah(4) = annotation('rectangle',ax1.Position, 'Color', 'b','lineStyle','--','LineWidth',2);
As you can see, the OuterPosition propery is preserved and the Position/InnerPosition properties have been adapted to the rotated y-axis label.
3) Change the vertical position of the y-axis label. Draw black dotted rectangles showing the updated position properties.
ax1.YLabel.Position(2) = ax1.YLabel.Position(2)+2;
ah(5) = annotation('rectangle',ax1.OuterPosition, 'Color', 'k', 'LineStyle',':','LineWidth',3);
ah(6) = annotation('rectangle',ax1.Position, 'Color', 'k','lineStyle',':','LineWidth',3);
As you can see, the original position property values have been returned as if the y-axis label were still oriented at 90 degrees.
Solution to the problem
Record the Position value of the axes prior to changing the y-axis label position. After changing the y-axis label position, reset the axes to its original position.
This is applied to the code from your demo.
ax1 = axes('OuterPosition',[0 0.50 1.0 0.50]);
ax1.Title.String = 'Preserve OuterPosition';
ax1.YLabel.String = 'Preserve OuterPosition';
ax1.YLabel.HorizontalAlignment = 'right';
ax1.YLabel.VerticalAlignment = 'top';
prePosition = ax1.Position;
ax1.YLabel.Position(2) = ax1.YLabel.Position(2)+2;
ax1.Position = prePosition;
Update
Starting in MATLAB R2023a when you change the Rotation property of an axis label in a 2-D plot, the HorizontalAlignment and the VerticalAlignment properties of the label automatically update to prevent overlap between the label and the axes.