System Information
Operating system: Windows-10-10.0.19043-SP0 64 Bits
Graphics card: Quadro K420/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 472.98
Blender Version
Broken: version: 3.1.2, branch: master, commit date: 2022-03-31 17:40, hash: rBcc66d1020c3b
Worked: none
Short description of error
When trying to snap to the front face of a cube, the snapped object jumps in a different direction.
Exact steps for others to reproduce the error
Select object A and try to snap to the front face of object B. Using vertex snap, median point, snap to closest, snap restricted along global Y axis. Object A will snap away from object B instead to its front face.
Both objects have rotation on the Z axis, which when applied causes the same snap to behave as expected. So it seems that object rotation affects its snap behaviour even when using global axes.

