In main, sizeof has access to the newly declared array's size. The type of arr is int[10] there, so sizeof returns 10 * sizeof(int), as expected.
Arrays and pointers aren't the same. for instance, you can't say arr = arr + 2 inside main, because its type (int[10]) is not assignable.
When you pass arr to x, arr "decays" into a pointer. You can now say arr = arr + 2 if you so please, since arr is now just a pointer. Thus, sizeof(arr) will return the size of an int*. If you want sizeof information to remain, and for arr not to decay when passing it, x must take arr by reference, as so:
void x(const int (&arr)[10])
If you do that, then arr, inside x, will have type int[10], and sizeof(arr) will return 10 * sizeof(int).