Similarly to how the dungeon is protected by dungeon guardians, the temple should be protected by "temple guardians" preventing players from entering until Plantera has been defeated. Regardless of whether the player got unlucky with a teleportation potion, farmed a rod of discord, did a hoik, or abused shimmer phasing, if a player is anywhere past the temple door, a head should fly up to attack them.
Their sprite would basically be a detached golem head that spins and maybe fires lasers, effectively a hardmode version of the dungeon guardian.
Their sprite would basically be a detached golem head that spins and maybe fires lasers, effectively a hardmode version of the dungeon guardian.