Can you use the Rod Of Discord to teleport out of the Jungle temple when golem is spawned?
Kind of a long title but what i am trying to say is if I spawn Golem in the jungle temple, will i be able to teleport out of the jungle temple and use a minion to kill golem?
Solution 1:
As cited from Terraria wiki:
Attempting to teleport into the Jungle Temple before Plantera is defeated will not work. It will work after Plantera is defeated, even allowing the player into a locked Jungle Temple without giving up a Temple Key.
Emphasis mine.
So using the Rod of Discord to teleport out of the Jungle Temple would work.
That said, the Golem's second stage has attacks that go through walls (as your comments suggested you wanted to do this for the Golem fight), meaning that it may not be entirely desirable to teleport outside the Temple, as this does not make the player invulnerable to the Golems attacks.
A more useful solution for a minion-based fight against Golem would be to box in the Golems spawn area and spawn the minions inside the box. Hammer down one of the bottom tiles of the box to prevent the Golem from moving down through it (as would normally happen if you attempted to box in the Golem), and the fight should be easy enough, at least until the second stage. For the second stage, just keep moving around while attempting to dodge attacks of the head while letting your minions deal with the body.