Yunhee J. answered 08/01/21
Experienced Korean Language Tutor 10+yr private lessons, Korean School
(1)
나 = I
가거든 = 가 +거든 [가: verb stem <-- 가다 to go] [ -거든: particle to explain ]
나 가거든 - if I go/leave, when I go/leave
(2)
나가거든 = 나가+거든 [나가: verb stem <-- 나가다 to go out] [거든:particle to explain]
나가거든 - (pronoun can be often omitted) --> If or when (I/we/he/she/they...) go out
If it was used as "나가거든" without space in the middle, technically we should see it as (2) but if it was used in a poem, maybe the author meant to overlay both meanings on purpose