Couple observations...
1). In your original request, you merely mentioned disabling the Y-direction control. Now, you indicate you need it at some specific location. That is a new restriction. However, the SETATREF formula did, at least in my test case, park the Y-direction along the buttom edge of the shape. So, this does seem to meet the new requirement. Perhaps a better explanation of your need? A couple of pix to illustrate what you want, don't want.
2) The SETATREF formulas do not get blown-away when User makes an entry via ribbon GUI. The formula gets clobbered if (a) it is intentionally overwritten directly in shapesheet, or, (b) via SETF function in another shapesheet cell, or, (c) via code. Perhaps you can upload what you've tried.
3). Thomas's solution is likewise unaffected by GUI ribbon entries. The behavior cell is unaffected.
4). In both methods, the Y-direction is only inhibited for the 3 angles. For ALL other angles, the user can freely place it.
5) the IF statement can do what you want. Its syntax is IF something true, do this, otherwise do something else.
The following should do what you want. In the Y-Value cell, use this formula: =IF(OR(Angle=0,ABS(Angle)=180),SETATREF(User.Row_1,-0.25),SETATREFEXPR(Height*-0.186)) This locks the Y-position at specified place, 0.25" below the shape. Change value as desired. Otherwise, the control point is free to locate. The IF syntax is: when angle =0,+180,-180, then lock Y-position to set value, else, let control point move freely.
Note1: Still requires User section.
Note2: in indicated formula, setatrefexpr() shows 0.186 value. Don't worry about this. It will update when the control point is moved.