Based on the sutta below, if you say Prince Gautama and Shakyamuni Buddha is exactly the same person, that's eternalism, and if you say they are completely different persons, that's annihilationism.
The middle ground between the two extremes is dependent origination. Also, related is anatta. This answer on the continuity of consciousness is also useful. Explanations can be found in the linked answers.
They are related, but they are neither exactly the same, nor completely different.
A related analogy: you can step into the same river at two different moments, but the river would have subtly changed. The water molecules, temperature, pressure etc. would have changed. It's not exactly the same river, but it's also not completely different. The rivers of both moments are related. The change in the river from one moment to the next, was dependently originated based on conditions.
“Whether you are asked: ‘How is it, Master Gotama: is suffering
created by oneself?’ or ‘Is it created by another?’ or ‘Is it created
by both?’ or ‘Is it created by neither?’ in each case you say: ‘Not
so, Kassapa.’ When you are asked: ‘How is it then, Master Gotama: is
there no suffering?’ you say: ‘It is not that there is no suffering,
Kassapa; there is suffering.’ When asked: ‘Then is it that Master
Gotama does not know and see suffering?’ you say: ‘It is not that I do
not know and see suffering, Kassapa. I know suffering, I see
suffering.’ Venerable sir, let the Blessed One explain suffering to
me. Let the Blessed One teach me about suffering.” “Kassapa, if one
thinks, ‘The one who acts is the same as the one who experiences the
result,’ then one asserts with reference to one existing from the
beginning: ‘Suffering is created by oneself.’ When one asserts thus,
this amounts to eternalism. But, Kassapa, if one thinks, ‘The one who
acts is one, the one who experiences the result is another,’ then one
asserts with reference to one stricken by feeling: ‘Suffering is
created by another.’ When one asserts thus, this amounts to
annihilationism. Without veering towards either of these extremes, the
Tathagata teaches the Dhamma by the middle: ‘With ignorance as
condition, volitional formations come to be; with volitional
formations as condition, consciousness…. Such is the origin of this
whole mass of suffering. But with the remainderless fading away and
cessation of ignorance comes cessation of volitional formations; with
the cessation of volitional formations, cessation of consciousness….
Such is the cessation of this whole mass of suffering.’”
SN 12.17
Is the Dharmakaya the same as the Shakyamuni Buddha?
That's answered below:
Vakkali: "For a long time, Lord, I have wanted to come and set eyes on
the Blessed One, but I had not the strength in this body to come and
see the Blessed One."
Buddha: "Enough, Vakkali! What is there to see in this vile body? He
who sees Dhamma, Vakkali, sees me; he who sees me sees Dhamma. Truly
seeing Dhamma, one sees me; seeing me one sees Dhamma."
SN 22.87