Containers will reset their children rotation and scale when their transform change. You can use a Control as an intermediate between the container and content but you will need to sync its size between the content and the Control.
If you can update to Godot 4.7 you will be able to use the new offset transform feature:
I saw something about it and thought that was not for my case. I will look into it, thank you very much! This version of Godot really fits my project too; that is why I have not done it yet.
I have not been able to solve it with AspectRatioContainer node; it resets after changing the custom minimum size of its parent. I have been able to solve it with offset transform, Godot’s 4.7 new feature. I will have to move to Godot’s newer version. Thank you very much for your help!