id(), at least in practice, gives you the location in memory of the python object.
When you run id(x.untyped_storage()), a temporary UntypedStorage
object is created. It lives long enough for its id() to be taken, but when it
goes out of scope (which is after the call to id()), it is destroyed and its
memory is reclaimed. Then when you run id(y.untyped_storage()), a
new UntypedStorage object is created that happens to occupy the same
memory that was occupied by the just-destroyed x.untyped_storage().
To see the memory where the actual data in tensors x and y reside, look
at x.untyped_storage().data_ptr() and y.untyped_storage().data_ptr().
These will be different.