Label after 90 degree rotation is not resizing with the containter

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Maker

I have a richtextlabel which needs to be rotated to 90 degrees. This is the tree
Main Control Node
----Panel Container
------Margin Container
----------Panel Container
---------------Panel Container
--------------------------Margin Container

Here the margin container in bold is rotated to 90degrees and I swapped the x and y sizes and changed the x position to fit the Control Node size. I have kept the size flags as expand and fill. I have tried playing with different settings but cannot make it work.

without the 90 degree rotation everything works perfectly.

It is good when window size is kept the default size. When window is resized for some reason the text is going out of the window.

Default View

View when resized