A Better Axis Aligned Layout Group works like a Horizontal- or Vertical Layout Group but supports different settings for different Screen Configurations (see Size Config Collections) as well as Size Modifiers for Padding and Spacing.

In the settings you can set the Orientation per Screen Configuration to let it work like a Horizontal or Vertical Layout Group.

This way you can use the same layout group for Landscape mode and Portrait mode and switch the orientation accordingly if desired.