:welcome:
A calf will continue to nurse the dam for as long as they are together. Well, "might" quit sometime, but I've heard of cows nursing last years calf and calving with a new one.
Anyway, most producers separate them. You must have a secure place to put the calf. They will do about anything to get out. I never let my weaned calves get back with mom until the calf is grown and bred. You can separate them for months and the calf may go back to nursing. Not likely, but a chance, so I wean in September and they never get together until about April the following year.
There are also weaning flaps - here is a link to several different types:
https://www.google.com/search?q=cattle+weaning+flaps&rlz=1C1JPGB_enUS786US786&oq=cattle+weaning+flaps&aqs=chrome..69i57.3999j0j4&sourceid=chrome&ie=UTF-8
They are designed to be put in while they are with their dam. They get to socialize with dam, but unable to suck. Then you can easily separate them without as much stress on the calf. They are NOT designed to be put in indefinitely.