Sometimes when I grab two corner anchor points of a rectangle shape and use the arrow keys to nudge them left or right, the entire shape flips horizontally instead. This has been happening for several Photoshop versions now. Currently running the latest on macOS.
I can reproduce the issue in the first two videos. It seems to be caused by tranforming the shape to rotate it 180º - then do the nudge of the points. I've asked engineering to take a look at that one.
On the second one, I'm trying to figure out what that shape is, what state it's in, and what you're doing to it. Might need you to share that file for deeper inspection.