It works just fine in the samples I have here, why would it break?
If the rotation is a multiple of 90 degrees, the upper-left corner will not be the same point, but you're not making any attempt to use a different corner for the origin of your rectangle.
If the rotation is something like 45 degrees, the result can't be expressed as a RectF.