Hi,
For some reason, the orientation of ARPlane is different when in the XR Simulator and the Real World, is it something I am doing wrong or it is just a bug? I am using ARKit and ARFoundation 5.0.3.
See the example, drawing transform.up(green), transform.right(red) and transform.forward(blue)
You should not assume that a detected plane will be created with a known orientation. In this case we can see that ARKit has detected a plane with a rotation that is 90-degrees rotated about the normal from the example in your XR Simulation, but note that ARKit plane rotations are not fixed. The ARKit plane rotation can change during runtime as well, as ARKit improves its understanding of your environment.
When working with ARPlanes (Class ARPlane | AR Foundation | 4.2.10), you should rely on their properties such as center, boundary, and normal to reason about them.
Hope that helps!