The Transdimensional Trapdoor is equivalent to an emergency exit for Pocket Dimensions, teleporting you to whatever door first opened the first Pocket Dimension.
Regardless of where you place the hatch in a dimension, it will always send you to the door to the first dimension, unless you have ventured more than 6 Dimensional Doors away from the Overworld, when it begins to fail.