A layer flips around its anchor point. If you move the anchor point away from the center of the layer, the layer may move when you flip it.
To flip horizontally, enter a negative Width value.
To flip vertically, enter a negative Height value.

To flip a layer by dragging in the
Composition panel, drag a layer handle across the layer’s anchor
point. (See Show or hide layer controls in the Composition panel.)