As a follow-up to T380471: Content Translation looks broken on desktop in multiple languages (November 21, 2024) and to rECTX7e802ae4099d: Fix layout broken by display:flex on HorizontalLayout
I'm not sure if this code should even be using HorizontalLayout. It looks like you were already overriding most of the things it does (which is not much).
If it isn't useful, not using it may reduce our future breakages.