The Flyout ad will always expand in the direction that you set.
If the device width is too thin and it flies out left or right, it will appear off screen.
For that reason, if the same ad is running on multiple devices, it is usually your best idea to keep the expanding direction up or down.
Alternatively, you can create a campaign placement targeted to mobile and expand in one direction. You’ll also create another ad and campaign placement targeted to desktop.
You can control which ads appear on which devices on the placements page.