My guess is that there is a time lag between when the bindings are applied and when the layout is calculated.
If you use a resizable pane rather than a rectangle and set appropriate constraints on the pane, so that it behaves and resizes like your rectangle does, then I don't see the same laggy behavior. I think that is because the pane is resized within the same layout pass as the rest of the UI whereas the bound rectangle might be resized in a subsequent layout pass, but that is just speculation.
When you use binding for layout there is a slightly recursive or iterative relationship happening, the HBox's width is calculated based upon its content width (the rectangle's width), but the content width (the rectangle's width) is calculated using a bind to the HBox's width - I'm not sure that specifying such interdependent layout rules using binding is a very good idea. As an alternative you can use resizable layout managers with constraints (as shown in the example below), or layout programatically by overriding the
layoutChildren() method for Region. Over-riding layoutChildren() is the way the internal implementation of JavaFX does most of its layouts for the layout managers and controls, however there are many tricks and difficulties to doing this (such as clean handling of snapping to pixel boundaries), so implementing your own layout by over-riding layoutChildren() is an advanced topic for which there is little to no tutorials on the Internet. So I advise sticking to constraints specified using existing resizable layout managers.