As we can observe, in case of protein synthesis: #DNA# itself doesn't move outside the nucleus to offer the sequence of its nucleotides. However, first it's transcribed into #mRNA#. #mRNA# is complementary transcript of specific gene on #DNA#. The #mRNA# then moves outside the nucleus and travel to cytoplasm to be translated into proteins.
Thus, #DNA# doesn't need to depart from the nucleus in order to work.
So, we can say that #DNA# can perform it's function without leaving the nucleus because its friend i.e m#RNA# convey its message to ribosomes. The ribosomes then translate the nucleotide sequence of mRNA into an amino acid sequence in polypeptide i.e protein.
Hope it helps...