How to get my turtles to stay in their pond?

Solution 1:

They don't want to.
You already know that turtles remember the block on which they hatch as their home beach, but that doesn't mean that they will always live there. My turtle farm has the same problem, they prefer the sea.

Their behaviour is explained by Minecraft wikia:

When on land, they generally attempt to move to the nearest water source with direct sky access.
No matter how far away the turtle is, it always attempts to return to its home beach to lay its eggs after breeding.
Feeding two turtles seagrass causes them to enter love mode, causing one of the turtles to have eggs in its inventory. The pregnant turtle then travels back to its home beach, which is where it first spawned.

If you want to keep them in your pond you need to trap them, build a fence/wall around it.