There’s a bug on the TextEntity in Rhino 7 (not tested in Rh8).
It changes TextHeight whenever the GeometryBase.GetBoundingBox() is called.
See below
TextEntity te = new TextEntity();
te.TextHeight = 1000;
te.RichText = "HELLO";
Print(te.TextHeight.ToString());
var BBOx = te.GetBoundingBox(false);
Print(te.TextHeight.ToString());
// Outputs:
// 1000
// 1